home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 4 / Gold Medal Software - Volume 4 (Gold Medal) (1994).iso / netutils / brir110e.arj / DOC.ZIP / DISTRIB.TXT < prev    next >
Text File  |  1994-06-17  |  150KB  |  3,911 lines

  1. Part Four: Software Distribution
  2.  
  3. List of Topics
  4. 19.0 BrightWorks Distribution
  5. 19.1 About BrightWorks' Software Distribution Capability
  6. 19.2 How This Part is Organized
  7. 19.3 Software Distribution Concepts
  8. 19.4 BrightWorks' Software Distribution Modules
  9. 19.4.1 BrightWorks Console/Administrative Program
  10. 19.4.2 Update Program
  11. 19.5 Distribution Configuration Options
  12. 19.5.1 Running the Update Program
  13. 19.5.2 Automating the Update Program
  14. 19.6 Quick Start to Preparation and Setup for Software Distribution
  15. 20.0 Filesets
  16. 20.1 Introduction
  17. 20.1.1 Fileset Features
  18. 20.1.2 Access to Fileset Functions
  19. 20.1.3 What's in this Chapter
  20. 20.2 The Fileset Directory
  21. 20.2.1 Defining a Fileset Directory
  22. 20.3 Creating Filesets
  23. 20.4 Managing Filesets
  24. 20.4.1 Editing Filesets
  25. 20.4.2 Renaming Filesets
  26. 20.4.3 Copying Filesets
  27. 20.4.4 Deleting Filesets
  28. 21.0 Scripts
  29. 21.1 Introduction
  30. 21.1.1 Script Features
  31. 21.1.2 Access to Script Functions
  32. 21.1.3 What's in this Chapter
  33. 21.2 Creating Scripts
  34. 21.3 Compiling Scripts
  35. 21.4 Managing Scripts
  36. 21.4.1 Editing Scripts
  37. 21.4.2 Renaming Scripts
  38. 21.4.3 Copying Scripts
  39. 21.4.4 Deleting Scripts
  40. 21.4.5 Incorporating BrightWorks Scripts
  41. 22.0 Software Distribution Script Language
  42. 22.1 Introduction
  43. 22.1.1 What's in this Chapter
  44. 22.2 Notes on Syntax
  45. 22.3 Script Functions
  46. 22.3.1 Type of Functions
  47. 22.3.2 User-defined Variables
  48. 22.4 DOS Functions
  49. 22.5 Easy System File Functions
  50. 22.6 Windows System File Functions
  51. 22.7 Miscellaneous Functions
  52. 22.8 Rules and System Variables
  53. 22.8.1 System Variables
  54. 22.8.2 String Type Rules:
  55. 22.8.3 Integer Type Rules:
  56. 22.9 DOS Error Codes
  57. 23.0 Scopes
  58. 23.1 Introduction
  59. 23.1.1 Scope Features
  60. 23.1.2 Access to Scope Functions
  61. 23.1.3 What's in this Chapter
  62. 23.2 Creating Scopes
  63. 23.3 Scope Queries
  64. 23.3.1 Creating a New Query
  65. 23.3.2 Editing a Query
  66. 23.3.3 Deleting a Query
  67. 23.3.4 Applying a Query to the Scope
  68. 23.3.5 Removing a Query from the Scope
  69. 23.3.6 Creating a Complex Query
  70. 23.4 Managing Scopes
  71. 23.4.1 Renaming Scopes
  72. 23.4.2 Copying Scopes
  73. 23.4.3 Deleting Scopes
  74. 24.0 Packages
  75. 24.1 Introduction
  76. 24.1.1 Package Features
  77. 24.1.2 Access to Package Functions
  78. 24.1.3 What's in this Chapter
  79. 24.2 Creating and Editing Packages
  80. 24.2.1 Editing Packages
  81. 24.3 Managing Packages
  82. 24.3.1 Prioritizing Packages
  83. 24.3.2 Renaming Packages
  84. 24.3.3 Activating/Deactivating Packages
  85. 24.3.4 Deleting Packages
  86. 24.4 The Package Timer
  87. 25.0 Monitoring Software Distribution
  88. 25.1 Introduction
  89. 25.1.1 Access to the Software Distribution Log
  90. 25.1.2 What's in this Chapter
  91. 25.2 The Software Distribution Log
  92. 25.2.1 Viewing Log History Details
  93.  
  94.  
  95. 19.0 BrightWorks Distribution 
  96.  
  97. Welcome to BrightWorks' distribution features which enable software and  
  98. script distribution from a central location. 
  99.  
  100. NOTE:  This chapter pertains to BrightWorks. 
  101.  
  102.  
  103. 19.1 About BrightWorks' Software Distribution Capability 
  104.  
  105. BrightWorks' software distribution capabilities provide a method for  
  106. distributing software packages and modifying workstation configuration  
  107. files from a central location.  The software distribution features  
  108. facilitate consistency among the workstations across your local area  
  109. network and improve the productivity of the LAN Administrator.   
  110.  
  111. Distributing software and modifying workstation configuration files  
  112. from a central location on your network allows the LAN Administrator  
  113. to easily do the following: 
  114.  
  115. o  update system executables and/or drivers (e.g., operating systems,  
  116. network drivers) 
  117.  
  118. o  update system files (e.g., AUTOEXEC.BAT, CONFIG.SYS, WIN.INI, network  
  119. login script) 
  120.  
  121. o  install and update software on user workstations across the local  
  122. area network 
  123.  
  124. NOTE:  BrightWorks' Software Distribution capabilities can be used to  
  125. distribute software and/or scripts to any workstation in the BrightWorks  
  126. local site (i.e., the site which identifies the Fusion program  
  127. directory).  Sites are discussed in detail in section 13.2.1 entitled  
  128. "Maintaining LAN Sites." 
  129.  
  130.  
  131. 19.2 How This Part is Organized 
  132.  
  133. The following table lists the chapters in this part of the BrightWorks manual: 
  134.  
  135. CHAPTER                         DESCRIPTION 
  136. 19.0 Introduction               Presents an overview on the use of  
  137.                 BrightWorks' software distribution  
  138.                 capabilities.  Also provides instructions  
  139.                 on running and automating the  
  140.                 distribution update program. 
  141.  
  142. 20.0 Filesets                   Presents the procedures for managing  
  143.                 filesets, including creating, editing,  
  144.                 renaming, copying and deleting. 
  145.  
  146. 21.0 Scripts                    Presents the procedures for managing  
  147.                 scripts, including creating, editing,  
  148.                 renaming, copying and deleting. 
  149.  
  150. 22.0 Software Distribution      Lists the variables and rules for each  
  151. Script Language                 function in the BrightWorks scripting  
  152.                 language. 
  153.  
  154. 23.0 Scopes                     Presents the procedures for managing  
  155.                 scopes, including creating, editing,  
  156.                 renaming, copying and deleting; also  
  157.                 discusses creating and managing queries  
  158.                 to assist in scope definition. 
  159.  
  160. 24.0 Packages                   Presents the procedures for managing  
  161.                 packages, including creating, editing,  
  162.                 renaming, copying and deleting. 
  163.  
  164. 25.0 Monitoring Software        Presents the procedures for viewing and  
  165. Distribution                    managing the Software Distribution Log  
  166.                 History. 
  167.  
  168. NOTE:  Because BrightWorks' software distribution capabilities are  
  169. provided with the inventory capabilities, the procedures for generating  
  170. distribution reports are discussed throughout Chapter 18 of this manual.  
  171.  
  172.  
  173. 19.3 Software Distribution Concepts 
  174.  
  175. An understanding of the following concepts will help you in gaining full  
  176. advantage of BrightWorks' software distribution capabilities: 
  177.  
  178. o  Fileset - A file that contains one or more compressed files.   
  179. Each compressed file may also indicate a target directory structure in  
  180. which the file should be decompressed.  For example, assume a fileset  
  181. named NEW_INI_FILES.  The fileset might consist of two files: WIN.INI  
  182. and SYSTEM.INI which have been defined to be decompressed into a  
  183. target directory named PUB\WIN.310. 
  184.  
  185. o  Script - A sequence of one or more commands which define an operation  
  186. to be performed on a workstation receiving a distribution.  For example,  
  187. a script might include the commands to add a new group to the Windows  
  188. Program Manager, to copy file(s) from one location to another, or to  
  189. change parameters within certain files. 
  190.  
  191. o  Scope - A group of one or more workstations that have been identified  
  192. to receive a distribution.  For example, to distribute a script to all  
  193. 386 workstations, you must create a scope which includes the 386 workstations. 
  194.  
  195. o  Package - The distributed object which contains scheduling information,  
  196. as well as a fileset and/or script and a scope.   
  197.  
  198. The package being created is named "Updated INI Files," as indicated in  
  199. the dialog box title bar.  The package is scheduled to be distributed on  
  200. 6/30/1994.  The package consists of the fileset named "NEW_INI_FILES,"  
  201. which will get distributed to all nodes included in the scope named  
  202. "LOCAL NODES." 
  203.  
  204. The following key features help you distribute software across your LAN: 
  205.  
  206. o  Creating filesets which include files to be installed on remote  
  207. workstations. 
  208.  
  209. o  Creating scripts to be executed by remote workstations. 
  210.  
  211. o  Defining scopes of workstations to receive distributed packages. 
  212.  
  213. o  Creating and scheduling packages which consist of a scope and one  
  214. fileset and/or one script. 
  215.  
  216. o  Monitoring package progress via the Software Distribution Log History  
  217. dialog box. 
  218.  
  219.  
  220. 19.4 BrightWorks' Software Distribution Modules 
  221.  
  222. The BrightWorks software distribution capabilities interact with two  
  223. major functional modules.  As an introduction to software and script  
  224. distribution, this section briefly describes the following modules: 
  225.  
  226. o  BrightWorks console and administrative functions 
  227. o  Remote workstation update program (SDUPDATE.EXE) 
  228.  
  229. NOTE:  BrightWorks' software distribution capabilities are provided with  
  230. the inventory capabilities discussed in Part Three of this manual. 
  231.  
  232. 19.4.1 BrightWorks Console/Administrative Program 
  233.  
  234. BWORKS.EXE is the BrightWorks console and administrative program.  This  
  235. program provides access to all BrightWorks capabilities.  This main module  
  236. is a Windows-based program and is intended to be used by the LAN network  
  237. manager to perform all software distribution functions. 
  238.  
  239. The software distribution functions available from the BrightWorks console  
  240. include: 
  241. o  Scope definition and management 
  242. o  Script creation and management 
  243. o  Package creation, scheduling and management 
  244. o  Pre-defined and custom distribution report generation   
  245.  
  246. 19.4.2 Update Program 
  247.  
  248. The update program (SDUPDATE.EXE) must be executed from each remote  
  249. workstation to enable the workstations to receive the distributed  
  250. packages they have been sent.  Upon BrightWorks installation, the update  
  251. program is copied into the BWORKS program directory. 
  252.  
  253. The update program is DOS-based and must be executed from the machine  
  254. which is to be updated.  To ensure that SDUPDATE.EXE is executed on a  
  255. regular basis, the command can be placed in the system login script.   
  256. Refer to the next section entitled "Distribution Configuration Options." 
  257.  
  258. NOTE:  WSDUPD.EXE is the BrightWorks update program which handles the script  
  259. functions related to installing Windows software.  This program must not be  
  260. directly run by the user--it is automatically loaded when the ADDGROUP,  
  261. ADDITEM or SCHEDULEWIN Windows System File script functions are used.  Refer  
  262. to section 22.6 entitled "Windows System File Functions." 
  263.  
  264.  
  265. 19.5 Distribution Configuration Options 
  266.  
  267. The update program SDUPDATE.EXE must be run from each workstation in  
  268. order for it to receive the distributed packages it has been sent.   
  269. Upon BrightWorks installation, the update program is copied into the  
  270. BWORKS program directory.   
  271.  
  272. The SDUPDATE program's syntax is as follows: 
  273.  
  274. SDUPDATE [drive:[\path]] 
  275.  
  276. in which drive and path are optional parameters.  The brackets are not typed.  
  277.  
  278. Consider the following examples: 
  279.  
  280. Example                 Result 
  281. SDUPDATE                SDUPDATE will look in the current directory. 
  282. SDUPDATE F:             SDUPDATE will look in the current directory  
  283.             on drive F:. 
  284. SDUPDATE F:\path        SDUPDATE will look in the directory F:\path. 
  285.  
  286.  
  287. NOTES: a - The Btrieve Record Manager must be loaded before running  
  288. SDUPDATE.EXE.  Refer to the section entitled "Consider Improving  
  289. BrightWorks' Database Performance" in Chapter 12 of this manual for a  
  290. discussion on the Btrieve options. 
  291. b - When running the Brequestor, BSPXCOM and BROUTER must also be loaded  
  292. on the file server.  For details on loading these programs, refer to  
  293. your Novell documentation. 
  294. c -  When running SDUPDATE.EXE in a DOS box, you must load another  
  295. session of BREQUEST by entering the following command: 
  296.  
  297.      BREQUEST /D:17000 /L 
  298.  
  299. After running SDUPDATE, end the additional session by issuing the  
  300. ENDBTRV command. 
  301.  
  302. 19.5.1 Running the Update Program 
  303.  
  304. Use the following procedure to manually run the update program at a  
  305. workstation. 
  306.  
  307. 1.  At the workstation which is to receive the distributed package, load  
  308.     the Btrieve Record Manager. 
  309.  
  310.     Either Btrieve or Brequest can be used.  Refer to section 12.6.3 entitled  
  311.     "Consider Improving BrightWorks' Database Performance" for a discussion  
  312.     on the Btrieve options. 
  313.  
  314. 2.  Make the BrightWorks directory your current directory. 
  315.  
  316.     Use the DOS CD command to change into the BWORKS program directory,  
  317.     or map a physical drive to the BWORKS directory. 
  318.  
  319. 3.  Execute the SDUPDATE.EXE program. 
  320.  
  321.     For example, enter the following at the DOS command line: 
  322.  
  323.     SDUPDATE 
  324.  
  325.     Upon executing SDUPDATE, several messages will display at the workstation.   
  326.     If the user has not been given the option to refuse the update or  
  327.     change the installation path, then the update program will continue  
  328.     automatically (e.g., the package's script or fileset will be installed 
  329.     at the workstation). 
  330.  
  331.     a. If you are given the option of refusing the package, then the  
  332.     prompt displays.  To install the package at this time, type <Y>.   
  333.     To install the package another time (e.g., the next time the update  
  334.     program is run), type <N>. 
  335.  
  336.     NOTE:  If the date or maximum number of times has expired and the  
  337.     package is configured to 'force upgrade,' then the package will be  
  338.     installed regardless of the user's response to this prompt. 
  339.  
  340.     b. If you are given the option of overriding the installation path,  
  341.     then the prompt displays.  To override the default installation path,  
  342.     type <Y>.  To accept the default installation path, type <N>.  If  
  343.     you type <Y> to override the default installation path, you are  
  344.     prompted to specify a new installation path.  Type the new path and  
  345.     press the <ENTER> key.  The update program continues, and the package  
  346.     is installed. 
  347.  
  348. 19.5.2 Automating the Update Program  
  349.  
  350. To ensure that SDUPDATE is executed on a regular basis, the command can  
  351. be placed in the system login script.   
  352.  
  353. The following example illustrates SDUPDATE being executed from within  
  354. the system login script.  (Refer section 35.0 for instructions on  
  355. configuring the Btrieve NLM or VAP.) 
  356.  
  357. .... 
  358. MAP G:=SERVER/SYS:FUSION 
  359. DRIVE G: 
  360. #BREQUEST /D:17000 
  361. #SDUPDATE 
  362. #ENDBTRV 
  363. .... 
  364.  
  365. where G:=SERVER/SYS:FUSION is the drive ID and complete path where the  
  366. BrightWorks files and update program are stored. 
  367.  
  368.  
  369. 19.6 Quick Start to Preparation and Setup for Software Distribution 
  370.  
  371. This section provides the steps necessary to successfully distribute software. 
  372.  
  373. 1.  Create a FILESET which will include files to be installed on the remote 
  374.     workstation. 
  375.  
  376.     For example, the FILESET might include the following files necessary to 
  377.     update the PC to run Windows: LAN Driver, IPXODI, LSL, NETX, HIMEM, 
  378.     SMARTDRIVE, EMM286 & MOUSE. 
  379.  
  380.     See section 20.3 entitled "Creating Filesets." 
  381.  
  382. 2.  Create SCRIPTS to be executed by remote workstations or modify canned 
  383.     scripts to meet your needs to complete certain tasks. 
  384.  
  385.     See section 21.4.5 entitled "Incorporating BrightWorks' Scripts." 
  386.     The following files are specifically recommended: 
  387.     a. AUTORLP.SCR replaces the AUTOEXEC.BAT file. 
  388.     b. CFGRPLMT.SCR replaces the CONFIG.SYS file. 
  389.     c. WININST.SCR Windows Network Installation. 
  390.     NOTE: These scripts will require minor modifications to meet your 
  391.     specific environment requirements (e.g., drive mappings, local  
  392.     Windows install, etc.). 
  393.  
  394. 3.  Define SCOPES of workstation to receive distributed packages. 
  395.  
  396.     See section 23.2 entitled "Creating Scopes." Apply queries to scopes 
  397.     (e.g., who will receive the packages based on a criteria). See section 
  398.     23.3 entitled "Scope Queries." 
  399.  
  400. 4.  Create and schedule PACKAGES which will consist of a scope, a fileset, 
  401.     and/or one script. 
  402.  
  403.     See section 24.2 entitled "Creating and Editing Packages." 
  404.  
  405. 5.  Run SDUPDATE from the System Login Script to distribute the PACKAGE. 
  406.  
  407.     Suggested method: 
  408.     MAP F:=SERVER\VOL:BWORKS 
  409.     DRIVE F: 
  410.     #BREQUEST /D:17000 
  411.     #SDUPDATE 
  412.     #ENDBTRV 
  413.     MAP DEL F: 
  414.  
  415.     See section 19.5 entitled "Distribution Configuration Options." 
  416.  
  417. 6.  Monitor Software Distribution by viewing the Distribution Log. 
  418.  
  419.     The history log provides a summary of all scheduled packages. See  
  420.     section 25.2 entitled "The Software Distribution Log." 
  421.  
  422.  
  423.  
  424. 20.0 Filesets 
  425.  
  426. Chapter 19 provided an introduction to BrightWorks' software distribution  
  427. capability.  This chapter discusses the creation and management of  
  428. filesets--the set of files to be installed on a remote workstation. 
  429.  
  430. NOTE:  This chapter pertains to BrightWorks. 
  431.  
  432.  
  433. 20.1 Introduction 
  434.  
  435. A fileset is a set of files, stored in compressed format, to be installed  
  436. on a remote workstation.  Distributing filesets from a central location  
  437. simplifies a System Administrator's job.  Instead of physically moving  
  438. from workstation to workstation to install or upgrade application files, the  
  439. Administrator only needs to centrally distribute one fileset consisting  
  440. of the application files.  Upon receipt at a remote workstation, the  
  441. fileset contents are decompressed and copied onto the workstation's  
  442. hard drive.   
  443.  
  444. 20.1.1 Fileset Features 
  445.  
  446. In addition to containing a number of files to be distributed, filesets  
  447. can be defined to create a target directory structure.  For example, if  
  448. you create a fileset which includes all files for Windows 3.1, you must  
  449. also define the contents of the SYSTEM subdirectory.  BrightWorks  
  450. can do this for you automatically by including the full path name of  
  451. every file included in the fileset.  
  452.  
  453. Filesets and scripts are a powerful combination.  Consider the following  
  454. examples: 
  455.  
  456. o  Packaging the latest WIN.INI file with a script which determines  
  457. whether the existing WIN.INI file is outdated.  The script will also  
  458. copy the new WIN.INI if an old file is detected. 
  459.  
  460. o  Packaging the Novell IPXODI files and sending them to the scope of  
  461. nodes using IPX.  After the fileset is decompressed in the target  
  462. directory, the script will update the AUTOEXEC.BAT file to reflect the  
  463. use of IPXODI.  
  464.  
  465. Filesets can be stored, used and reused as a resource within BrightWorks.   
  466. An administrator can create a new fileset, as well as edit, copy, rename  
  467. and delete a fileset.  The steps for each procedure are provided in this  
  468. chapter. 
  469.  
  470. 20.1.2 Access to Fileset Functions 
  471.  
  472. Most fileset functions are accessed by choosing the Filesets command  
  473. from the Tools menu.  The Filesets dialog box displays listing all  
  474. available filesets. 
  475.  
  476. The process of defining a directory in which filesets are saved (the  
  477. "default fileset directory") is performed by choosing the Distribution  
  478. command from the Administration menu.  From the sub-menu that displays,  
  479. choose the Preferences command.  
  480.  
  481. 20.1.3 What's in this Chapter 
  482.  
  483. The following chart describes the sections in this chapter: 
  484.  
  485. SECTION                         DESCRIPTION 
  486. The Fileset Directory           Discusses the fileset directory,  
  487.                 and describes the procedures for its  
  488.                 definition. 
  489.  
  490. Creating Filesets               Describes procedures for defining new  
  491.                 filesets. 
  492.  
  493. Managing Filesets               Describes procedures for editing, renaming,  
  494.                 copying and deleting filesets. 
  495.  
  496.  
  497. 20.2 The Fileset Directory 
  498.  
  499. The fileset directory defines the path in which filesets are stored.   
  500. Upon saving a fileset, a copy of the files that are included in the  
  501. fileset are compressed.  They are stored in a file which is placed in the  
  502. fileset directory defined at the time the fileset is saved.  For example,  
  503. if your fileset directory is defined as F:\FUSION\FILESETS, then the  
  504. filesets that you create will be stored in the F:\FUSION\FILESETS directory. 
  505.  
  506. 20.2.1 Defining a Fileset Directory 
  507.  
  508. Use the following procedure to define the directory in which filesets  
  509. should be stored. 
  510.  
  511. 1.  Choose the Distribution command from the Administration menu.  From  
  512.     the sub-menu that displays, choose the Preferences command. 
  513.  
  514.     The Preferences dialog box displays. 
  515.  
  516. 2.  Choose the Browse button to define the pathname into which the  
  517.     compressed filesets are to be stored. 
  518.  
  519.     The Path Browse dialog box displays enabling you to select from  
  520.     the lists of Drives and Directories.  Click on the Drives and  
  521.     Directories fields to select the desired pathname. 
  522.  
  523. 3.  When the pathname is selected, choose the OK button. 
  524.  
  525.     The Path Browse dialog box closes, and the selected pathname displays  
  526.     in the Path to Filesets field of the Preferences dialog box. 
  527.  
  528. 4.  Choose the Save button to define the fileset directory. 
  529.  
  530.     All saved filesets will be stored in the defined directory. 
  531.  
  532. NOTE:  The fileset directory instructs the update program as to where  
  533. the filesets are located.  As a result, changing the fileset directory  
  534. after you have created filesets and included them in packages can  
  535. invalidate those packages.  If you change the default directory, you must  
  536. also copy all fileset files (*.SET) into the new fileset directory.   
  537. Be sure that each user has the same drive letter mapped to the same  
  538. server/volume specified in the Preferences dialog box.  Also, you cannot  
  539. store filesets on a non-network drive. 
  540.  
  541.  
  542. 20.3 Creating Filesets 
  543.  
  544. Use the following procedure to create a new fileset. 
  545.  
  546. 1.  Choose the Filesets command from the Tools menu. 
  547.  
  548.     The Filesets dialog box displays listing the names of all defined  
  549.     filesets.   
  550.  
  551. 2.  Choose the New button. 
  552.  
  553.     The New Fileset dialog box displays prompting you to enter a name  
  554.     for the new fileset.   
  555.  
  556. 3.  Enter the new fileset name, and choose the OK button. 
  557.  
  558.     A fileset name can be up to 80 characters, and all typed characters  
  559.     are valid. 
  560.  
  561.     Upon choosing the OK button, the Edit Fileset dialog box displays  
  562.     prompting you to define the contents of the new fileset.   
  563.  
  564.     The fileset name being created or edited displays in the title bar of  
  565.     the Edit Fileset dialog box. The name of the fileset being created  
  566.     is "1994 Budget Files." 
  567.  
  568.     For each file included in the fileset, the following information displays:  
  569.     File Name, Original Size, Compression Ratio, Date, Time, and Path.  The  
  570.     file list area is empty for new filesets.   
  571.  
  572.     The Filename field in this dialog box displays the name of the file  
  573.     which will hold the compressed fileset. Upon saving the fileset, a  
  574.     compressed copy of all of the listed files will be stored in the file  
  575.     named "1994BUDG.SET."  This file is automatically created by BrightWorks  
  576.     when the fileset is created.  It is stored in the fileset directory  
  577.     which is currently defined. 
  578.  
  579. 4.  To add a file to the fileset, choose the Add button. 
  580.  
  581.     The Add File dialog box displays.  This dialog box is a standard  
  582.     Windows dialog box used for opening, selecting and browsing files.   
  583.  
  584. 5.  Make selections from the Directories and Drives lists to find the file(s)  
  585.     to include in the fileset.  
  586.  
  587.     For example, choose the Drives down arrow button, and click on Drive C:  
  588.     to display the directories on drive C.  From the list of directories  
  589.     which displays, click on one to display its file list. 
  590.  
  591. 6.  Select a file(s) from the File Name list. 
  592.  
  593.     Multiple files can be selected using the Windows extended select  
  594.     procedures (i.e., hold down the <CTRL> or <SHIFT> key while selecting  
  595.     files). 
  596.  
  597. 7.  To include the selected file(s)' path in the Edit Fileset dialog box,  
  598.     enable the Include Path option. 
  599.  
  600.     Placing a checkmark in this field causes the full pathnames of each  
  601.     selected file to be listed in the Edit Fileset dialog box.  (Step #9  
  602.     below provides the option to instruct the fileset to create the  
  603.     directory structure at the receiving workstation.) 
  604.  
  605. 8.  Choose the OK button. 
  606.  
  607.     Upon choosing the OK button, the selected files are listed in the Edit  
  608.     Fileset dialog box.  Only the File Name and Path information display  
  609.     at this time.  The other fields are not available until the fileset is  
  610.     saved. 
  611.  
  612. 9.  Enable or disable the Create Directory Structure option. 
  613.  
  614.     Enabling this option causes the full pathnames of each file listed in  
  615.     the Edit Fileset dialog box to be created at the receiving workstation.   
  616.     For example, assume that this option is enabled and a file is listed in  
  617.     the Edit Fileset dialog box as \USER\MARY\INVOICE.DOC.  In this  
  618.     case, the directories USER and MARY will be created at the receiving  
  619.     workstation if they do not already exist. 
  620.  
  621. NOTE:  A fileset is always decompressed into the target directory that  
  622. is specified when creating a package.  In the above example, if the Create  
  623. Directory Structure option is checked and the fileset is included in a  
  624. package that has a default path of C:\SALES, then the INVOICE.DOC file  
  625. will be decompressed into C:\SALES\USER\MARY. 
  626.  
  627. 10. To save the fileset contents, choose the Save button. 
  628.  
  629.     The changes made to a fileset are only committed to upon choosing the  
  630.     Save button.  The Updating Fileset dialog box displays while the  
  631.     fileset contents are being saved and compressed.  If you attempt to  
  632.     close the Edit Filesets dialog box without saving, you are prompted to  
  633.     save the fileset changes. 
  634.  
  635.     The fileset is created and added to the Filesets dialog box. 
  636.  
  637.  
  638. 20.4 Managing Filesets 
  639.  
  640. This section describes the procedures for editing, renaming, copying and  
  641. deleting filesets. 
  642.  
  643. 20.4.1 Editing Filesets 
  644.  
  645. Editing a fileset may become necessary in order to add or delete a  
  646. file according to a change in a fileset's intent. 
  647.  
  648. NOTE:  It is recommended that you temporarily deactivate any packages  
  649. which use the fileset you intend to edit. 
  650.  
  651. Use the following procedure to edit the contents of a fileset.  The  
  652. procedure assumes that you have already chosen the Filesets command from  
  653. the Tools menu to display the Filesets dialog box. 
  654.  
  655. 1.  Select the fileset from the list of Filesets, and choose the Edit button. 
  656.  
  657.     A fileset can also be selected for editing by double clicking on the  
  658.     fileset name in the Filesets dialog box.  The Edit Fileset dialog box  
  659.     displays listing all files included in the fileset.  
  660.  
  661.     For each file in the fileset, the following information displays: 
  662.  
  663.     o  File Name - the name of the file 
  664.     o  Original Size - the file size before compression 
  665.     o  Compressed Size - the file size after compression 
  666.     o  Ratio - the compression ratio 
  667.     o  Date - the file's creation date 
  668.     o  Time - the file's creation time 
  669.     o  Path - the file's path which displays only if the Include Path  
  670.     option is checked in the Add File dialog box. 
  671.  
  672. NOTE:  Some files may show a 0% compression ratio.  This occurs when the  
  673. file is already compressed or when the file is very small. 
  674.  
  675. 2.  To add a file to the fileset, choose the Add button. 
  676.  
  677.     The Add File dialog box displays.  Refer to the section above entitled  
  678.     "Creating Filesets" for detailed procedures on using this dialog box. 
  679.  
  680. 3.  To delete a file from the fileset, highlight the file name and choose  
  681.     the Delete button.  
  682.  
  683.     A prompt displays asking you to confirm the deletion.  Choose the Yes  
  684.     button to continue with the delete action. 
  685.  
  686.     If deleted, the file name is removed from the Edit Filesets dialog box.   
  687.  
  688. 4.  To save the edited fileset contents, choose the Save button. 
  689.  
  690.     The changes made to a fileset are only committed to upon choosing the  
  691.     Save button.  The Updating Fileset dialog box displays while the  
  692.     fileset contents are being saved and compressed.  If you attempt to  
  693.     close the Edit Filesets dialog box without saving, you are prompted to  
  694.     save the fileset changes. 
  695.  
  696. 20.4.2 Renaming Filesets 
  697.  
  698. Changing the name of an existing fileset renames all instances of the  
  699. former fileset name.  For example, the new fileset name is reflected in  
  700. the Filesets dialog box as well as in any packages which include the fileset. 
  701.  
  702. Use the following procedure to rename a fileset.  The procedure assumes  
  703. that you have already chosen the Filesets command from the Tools menu to  
  704. display the Filesets dialog box. 
  705.  
  706. NOTES: a - A fileset can be renamed even if it is part of an actively  
  707. scheduled package. 
  708. b - The name of the .SET file which is maintaining the compressed fileset  
  709. and is stored in the fileset directory does not change.  
  710.  
  711. 1.  To rename a fileset, select the fileset name from the list of Filesets,  
  712.     and choose the Rename button. 
  713.  
  714.     The Rename Fileset dialog box displays prompting you to enter a new  
  715.     fileset name. 
  716.  
  717. 2.  Enter the new fileset name, and choose the OK button. 
  718.  
  719.     The new fileset name displays in the Filesets dialog box, and the  
  720.     old name is removed.  All attributes of the old fileset are preserved  
  721.     in the renamed fileset (i.e., the fileset contents do not change). 
  722.  
  723. 20.4.3 Copying Filesets 
  724.  
  725. Use the following procedure to copy a fileset.  The procedure assumes that  
  726. you have already chosen the Filesets command from the Tools menu to display  
  727. the Filesets dialog box. 
  728.  
  729. NOTE:  A fileset can be copied even if the original fileset is part of  
  730. an actively scheduled package. 
  731.  
  732. 1.  To copy a fileset, select the fileset name from the list of Filesets,  
  733.     and choose the Copy button. 
  734.  
  735.     The Copy Fileset dialog box displays prompting you to enter a name  
  736.     for the new fileset. 
  737.  
  738. 2.  Enter the new fileset name, and choose the OK button. 
  739.  
  740.     The new fileset name is added to the Filesets dialog box.  The new  
  741.     fileset contents are identical to the original fileset contents. 
  742.  
  743. 20.4.4 Deleting Filesets 
  744.  
  745. Use the following procedure to delete a fileset.  The procedure assumes  
  746. that you have already chosen the Filesets command from the Distribution  
  747. menu to display the Filesets dialog box. 
  748.  
  749. NOTE:  A fileset that is part of a scheduled package cannot be deleted. 
  750.  
  751. 1.  To delete a fileset, select the fileset from the list of Filesets,  
  752.     and choose the Delete button. 
  753.  
  754.     A prompt displays asking you to confirm the deletion. 
  755.  
  756. 2.  Choose the Yes button to delete the fileset. 
  757.  
  758.     The fileset name is removed from the Filesets dialog box.   
  759.  
  760.  
  761.  
  762. 21.0 Scripts 
  763.  
  764. Chapter 20 discussed the creation and management of filesets.  This  
  765. chapter discusses the creation and management of scripts--a series  
  766. of commands to be executed on a remote workstation. 
  767.  
  768. NOTE:  This chapter pertains to BrightWorks. 
  769.  
  770.  
  771. 21.1 Introduction 
  772.  
  773. A script is a series of commands to be executed on a remote workstation.   
  774. Scripts must be written according to a defined syntax, and they must be  
  775. compiled successfully to be included in a package.   
  776.  
  777. NOTES: a - The commands and instructions for using BrightWorks' software  
  778. distribution scripting language are documented in Chapter 22 of this  
  779. manual. 
  780. b - BrightWorks is shipped with several script files that can be  
  781. customized for your own use. Refer to section 21.4.5 entitled "Incorporating  
  782. BrightWorks Scripts."  
  783.  
  784. 21.1.1 Script Features 
  785.  
  786. The ability to send scripts from a central location can be used to  
  787. contribute to the consistency and standardization of LAN workstations.   
  788. Scripts enable the LAN administrator to easily do the following: 
  789.  
  790. o  update system executables and/or drivers (e.g., operating systems,  
  791. network drivers) 
  792.  
  793. o  update system files (e.g., AUTOEXEC.BAT, CONFIG.SYS, WIN.INI,  
  794. network login script) 
  795.  
  796. o  install software on a user's workstation 
  797.  
  798. A user can create a new script, as well as edit, compile, copy, rename  
  799. and delete a script.  The steps for each procedure are discussed in this  
  800. chapter.   
  801.  
  802. 21.1.2 Access to Script Functions 
  803.  
  804. Script functions are accessed by choosing the Scripts command from the  
  805. Tools menu.  The Scripts window displays listing all available scripts.   
  806.  
  807. Script management is performed by either choosing the buttons in the  
  808. Scripts window or by choosing the corresponding commands from the File menu.   
  809. For example, when the Scripts window is active, a new script can be  
  810. created either by choosing the New button in the Scripts window or by  
  811. choosing the New Script command from the File menu.   
  812.  
  813. The Edit menu commands provide the standard Cut, Copy and Paste functionality  
  814. for use during script editing. 
  815.  
  816. 21.1.3 What's in this Chapter 
  817.  
  818. The following chart describes the sections in this chapter: 
  819.  
  820. SECTION                 DESCRIPTION 
  821. Creating Scripts        Describes procedures for defining new scripts. 
  822.  
  823. Compiling Scripts       Describes the procedures for compiling scripts. 
  824.  
  825. Managing Scripts        Describes procedures for editing, renaming,  
  826.             copying and deleting scripts. 
  827.  
  828.               
  829. 21.2 Creating Scripts 
  830.  
  831. A script is created by assigning both a script name and a file name to  
  832. the new script.  The script name is used for identification purposes  
  833. within BrightWorks.  For example, it is immediately obvious that the  
  834. script named "Upgrade to Win 3.1" is responsible for upgrading the  
  835. Windows software to version 3.1.  The script file name identifies the  
  836. ASCII text file containing the script commands.  The script file name  
  837. must be a valid DOS file name (e.g., 8 characters plus the 3 character  
  838. extension). 
  839.  
  840. After assigning the script name and file name, an "empty" script is created.   
  841. The empty script must be edited in order to add commands.   
  842.  
  843. Use the following procedure to create a new script. 
  844.  
  845. 1.  Choose the Scripts command from the Tools menu. 
  846.  
  847.     The Scripts window displays listing the names of all defined scripts.   
  848.     For each script, the last compilation date, the status and the file name  
  849.     also displays. 
  850.  
  851. 2.  Choose the New button. 
  852.  
  853.     The Open New Script dialog box displays prompting you to enter the  
  854.     name, file name and destination directory for the new script.   
  855.  
  856. 3.  Enter the new script information, and choose the OK button. 
  857.  
  858.     The script name can be up to 80 characters, and all typed characters  
  859.     are valid.  The script file name must follow the standard DOS conventions. 
  860.  
  861. NOTES: a - It is recommended that .SCR be assigned as the extension for  
  862. all script file names.  A script file is a text file and can be edited  
  863. with an external editor. 
  864. b - The scripts must reside on a network drive to which all users who will  
  865. receive the script have access 
  866.  
  867. Upon choosing OK, the message "This file does not exist.  Create the file?"  
  868. displays.  Choose the Yes button to create the script file and display the  
  869. Script Editor window. 
  870.  
  871. The script name being edited displays in the title bar of the Script Editor  
  872. window.  All commands that are included in this script are listed.  (The  
  873. list is empty for new scripts.) 
  874.  
  875. 4.  Type the script commands. 
  876.  
  877.     Script commands can be directly typed into the Script Editor window.   
  878.     Commands can also be selected from a list of commands by choosing the  
  879.     Functions button in the Script Editor window or the Paste Script  
  880.     Function command from the BrightWorks Edit menu (refer to the  
  881.     explanation below). 
  882.  
  883.     The script compiler requires one command per line.  No error checking  
  884.     is performed until the script is compiled. 
  885.  
  886.     Optional comments can be placed in the script preceded by a semi-colon.   
  887.     These comments are ignored at compile time.  For example: 
  888.  
  889.     ;This is a comment. 
  890.  
  891. NOTE:  The commands and rules for using the scripting language are  
  892. documented in Chapter 22 of this manual, "Software Distribution Script  
  893. Language." 
  894.  
  895. Standard editing functions are available from the Edit menu on the  
  896. BrightWorks menu bar.  The commands that are available from the Edit menu  
  897. are as follows: 
  898.  
  899. o  Undo - removes the last change made to the script. 
  900.  
  901. o  Cut - copies a block of selected text to the clipboard and removes the  
  902. text from the Script Editor window. 
  903.  
  904. o  Copy - copies a block of selected text to the clipboard. 
  905.  
  906. o  Paste - places the block of text from the clipboard into the Script  
  907. Editor window at the current cursor location. 
  908.  
  909. o  Paste Script Function - displays the Choose Script Function dialog box.   
  910. This dialog box allows you to select a function (from a list of all script  
  911. functions) to be placed in the script at the current cursor location.  A  
  912. function can be selected by either double clicking on the function name,  
  913. or highlighting the name and choosing the OK button.  Choosing the Help  
  914. button displays help text for the highlighted function. 
  915.  
  916. o  Find - searches the script for a user-specified text string. 
  917.  
  918. o  Next - searches the script for the next occurrence of the user-specified  
  919. text string. 
  920.  
  921. o  Replace -  searches the script for a user-specified text string and  
  922. replaces the found text with another user-specified text string. 
  923.  
  924. o  Fonts - enables you to select the font, style and size of the script type. 
  925.  
  926. NOTE:  During script editing, the status bar in the BrightWorks application  
  927. window indicates the current line and column position of the typing cursor. 
  928.  
  929. 5.  To compile the script, choose the Compile button in the Script Editor  
  930.     window. 
  931.  
  932.     Refer to the next section for details on compiling scripts. 
  933.  
  934. 6.  To save the script contents, choose the Save button in the Script  
  935.     Editor window. 
  936.   
  937.     The saved script contents are stored in ASCII text format.  The script  
  938.     must be compiled to be used in a package.  To compile the script, follow  
  939.     the procedure below entitled "Compiling Scripts." 
  940.  
  941. 7.  Choose the Close button to close the Script Editor window. 
  942.  
  943.     If you did not save the script changes as in Step #6 above, you are  
  944.     prompted to do so now.  Choose the Yes button to save the script changes,  
  945.     or choose No to close the Script Editor without saving any changes. 
  946.  
  947.     The new script is added to the Scripts window.  The status of all  
  948.     uncompiled scripts is 'ASCII.'   A script must be compiled to be used  
  949.     in a package. 
  950.  
  951.  
  952. 21.3 Compiling Scripts 
  953.  
  954. The Status field in the Scripts window indicates the status of each script.   
  955. Script status can be either ASCII or COMPILED.  A script's status must be  
  956. COMPILED to be used in a package for distribution. 
  957.  
  958. The commands and instructions for using the scripting language are documented  
  959. in Chapter 22 of this manual, "Software Distribution Script Language."   
  960. The compilation process checks the syntax and validity of the script's  
  961. commands. 
  962.  
  963. Use the following procedure to compile a script.  The procedure assumes  
  964. that you have already chosen the Scripts command from the Tools menu to  
  965. display the Scripts window. 
  966.  
  967. 1.  To compile a script, select the script in the Scripts window and  
  968.     choose the Compile button. 
  969.  
  970.     While a compile is in progress, the Compile Status dialog box displays.   
  971.  
  972.     When the compile is complete, the Status field in the Compile Status  
  973.     dialog box indicates success or failure.  If the compile fails, the  
  974.     Function field indicates the first function found which has invalid  
  975.     parameters.  The Statistics area indicates the total number of lines in  
  976.     the script (Lines field) and the number of errors found (Errors field). 
  977.  
  978. 2.  Choose the OK button to continue. 
  979.  
  980.     If the script compile is successful, then choose the Close button in  
  981.     the Script Editor window to return to the Scripts window which shows  
  982.     the script's status as COMPILED. 
  983.  
  984.     If the script compile fails, then the Compiler Messages dialog box  
  985.     displays listing the first script line which contains errors. 
  986.  
  987. 3.  To correct a compiler error condition, double click on an error line  
  988.     in the Compiler Messages dialog box. 
  989.  
  990.     The Script Editor window displays with the script that you are  
  991.     attempting to compile.  The selected error line is automatically  
  992.     highlighted. 
  993.  
  994. 4.  Correct all error conditions, and attempt to re-compile the script. 
  995.  
  996.     Refer to Chapter 22 of this manual for details on the scripting rules  
  997.     and commands. 
  998.  
  999.     After successful compilation of the script, the script can be used  
  1000.     in a package. 
  1001.  
  1002. NOTE:  If you edit a script that has already been compiled, the script  
  1003. must be successfully re-compiled in order to be used in a package.   
  1004. Refer to the "Last Comp" field in the Scripts window to discover the date  
  1005. on which the file was last compiled. 
  1006.  
  1007.  
  1008. 21.4 Managing Scripts 
  1009.  
  1010. 21.4.1 Editing Scripts 
  1011.  
  1012. Editing a script may be necessary under two circumstances: 
  1013.  
  1014. o  Existing scripts might need to be edited in order to add or delete  
  1015. commands according to a change in a script's intent. 
  1016.  
  1017. o  When a script compilation fails, the script must be edited to resolve  
  1018. the error(s). 
  1019.  
  1020. NOTE:  It is recommended that you temporarily deactivate any packages  
  1021. which use the script you intend to edit. 
  1022.  
  1023. Use the following procedure to edit the contents of a script.  The  
  1024. procedure assumes that you have already chosen the Scripts command from  
  1025. the Tools menu to display the Scripts window. 
  1026.  
  1027. 1.  Select the script from the Scripts window, and choose the Edit button. 
  1028.  
  1029.     A script can also be selected for edit by double clicking on the script  
  1030.     name in the Scripts window.  The Script Editor window displays. 
  1031.  
  1032.     The script name being edited displays in the title bar of the Script  
  1033.     Editor window.  All commands that are included in this script are listed. 
  1034.  
  1035. 2.  Edit the script commands. 
  1036.  
  1037.     Script commands can be directly typed into the Script Editor window.   
  1038.     Commands can also be selected from a list of commands by choosing the  
  1039.     Functions button in the Script Editor window or the Paste Script Function  
  1040.     command from the BrightWorks Edit menu. 
  1041.  
  1042.     The script compiler requires one command per line.  No error checking is  
  1043.     performed until the script is compiled. 
  1044.  
  1045. NOTES: a - The commands and rules for using the scripting language are  
  1046. documented in Chapter 22 of this manual, "Software Distribution Script  
  1047. Language." 
  1048. b - During script editing, the status bar in the BrightWorks application  
  1049. window indicates the current line and column position of the typing cursor. 
  1050.  
  1051. 3.  To compile the script, choose the Compile button in the Script Editor  
  1052.     window. 
  1053.  
  1054.     Refer to section 21.3 entitled "Compiling Scripts" for details on  
  1055.     compiling scripts. 
  1056.  
  1057. 4.  To save the edited script contents, choose the Save button in the  
  1058.     Script Editor window. 
  1059.  
  1060. 5.  Choose the Close button to close the Script Editor window. 
  1061.  
  1062. NOTE:  If you edit a script that has already been compiled, the script  
  1063. must be successfully re-compiled in order to be used in a package. 
  1064.  
  1065. 21.4.2 Renaming Scripts 
  1066.  
  1067. Changing the name of an existing script renames all instances of the  
  1068. former script name.  For example, the new script name will be reflected  
  1069. in the Scripts window as well as in any packages which include the script. 
  1070.  
  1071. Use the following procedure to rename a script.  The procedure assumes  
  1072. that you have already chosen the Scripts command from the Tools menu to  
  1073. display the Scripts window. 
  1074.  
  1075. NOTE:  A script can be renamed even if it is part of an actively scheduled  
  1076. package. 
  1077.  
  1078. 1.  To rename a script, select the script name from the Scripts, and choose  
  1079.     the Rename button.  
  1080.  
  1081.     The Rename Script dialog box displays prompting you to enter a new  
  1082.     script name. 
  1083.  
  1084. 2.  Enter the new script name, and choose the OK button. 
  1085.  
  1086.     The new script name displays in the Scripts window, and the old name  
  1087.     is removed.  All attributes of the old script are preserved in the  
  1088.     renamed script (i.e., the script contents do not change). 
  1089.  
  1090. NOTE:  The script rename procedure only changes the script name--the script  
  1091. file name does not change. 
  1092.  
  1093. 21.4.3 Copying Scripts 
  1094.  
  1095. Use the following procedure to copy a script.  The procedure assumes that  
  1096. you have already chosen the Scripts command from the Tools menu to display  
  1097. the Scripts window. 
  1098.  
  1099. NOTE:  A script can be copied even if the original script is part of an  
  1100. actively scheduled package. 
  1101.  
  1102. 1.  To copy a script, select the script from the Scripts, and choose the  
  1103.     Copy button.  
  1104.  
  1105.     The Copy Script dialog box displays prompting you to specify a name,  
  1106.     file name and destination directory for the new script.  The script  
  1107.     name can be up to 80 characters, and all typed characters are valid.   
  1108.     The script file name must follow the standard DOS conventions and can  
  1109.     reside in any directory. 
  1110.  
  1111. NOTE:  It is recommended that .SCR be assigned as the extension for all  
  1112. script file names. 
  1113.  
  1114. 2.  Enter the new script information, and choose the OK button. 
  1115.  
  1116.     The new script name is added to the Scripts window.  The new script is  
  1117.     populated with the same commands as the original script. 
  1118.  
  1119. 21.4.4 Deleting Scripts 
  1120.  
  1121. Use the following procedure to delete a script.  The procedure assumes that  
  1122. you have already chosen the Scripts command from the Tools menu to display  
  1123. the Scripts window. 
  1124.  
  1125. NOTE:  A script that is part of a scheduled package cannot be deleted. 
  1126.  
  1127. 1.  To delete a script, select the script from the Scripts, and choose the  
  1128.     Delete button.   
  1129.  
  1130.     A prompt displays asking you to confirm the deletion. 
  1131.  
  1132. 2.  Choose the Yes button to delete the script. 
  1133.  
  1134.     If deleted, the script name is removed from the Scripts window.   
  1135.  
  1136. NOTE:  The delete action only deletes the script name from the Scripts  
  1137. window.  The corresponding .SCR file is not deleted.  Therefore, if a script  
  1138. name is inadvertently deleted, you can create a new script and assign the  
  1139. same script file name to retrieve the deleted script contents. 
  1140.  
  1141. 21.4.5 Incorporating BrightWorks Scripts 
  1142.  
  1143. BrightWorks is shipped with several pre-defined scripts that can be  
  1144. customized for use in your environment.  Upon BrightWorks installation, the  
  1145. script files are copied into the BWORKS program directory.   
  1146.  
  1147. The table below lists the purpose of each script and indicates the script  
  1148. file name: 
  1149.  
  1150. PURPOSE                                 FILE NAME 
  1151. Word for Windows Local Installation     LOCAL.SCR 
  1152. Find and Delete a Program File          FINDDEL.SCR 
  1153. AUTOEXEC.BAT Replacement                AUTORLP.SCR 
  1154. AUTOEXEC.BAT Append                     AUTOAPP.SCR 
  1155. AUTOEXEC.BAT Modification               AUTOMOD.SCR 
  1156. CONFIG.SYS Replacement                  CFGRPLMT.SCR 
  1157. CONFIG.SYS Append                       CFGAPP.SCR 
  1158. CONFIG.SYS Modification                 CFGMOD.SCR 
  1159. DOS Upgrade 3.X to 6.X                  DOS3TO6.SCR 
  1160. DOS Upgrade 4.X to 5.X                  DOS4TO5.SCR 
  1161. DOS Upgrade 5.X to 6.X                  DOS5TO6.SCR 
  1162. Novell NETX Update                      NETXUP.SCR 
  1163. Novell Wkst ODI/VLM/IPX Driver          NETBAT.SCR  
  1164. Startup Batch File Update         
  1165. VLM Upgrade                             VLMUPGRD.SCR 
  1166. Send Text Message to Network Users      TYPE.SCR 
  1167. Copy Files to Server                    CPFS.SCR 
  1168. Windows Network Installation            WININST.SCR 
  1169. Windows Add Program Group               ADDGROUP.SCR 
  1170. Windows Add Program Item                ADDITEM.SCR 
  1171. Windows INI Replacement                 INIRPL.SCR 
  1172. Windows INI Append                      WINIAPPD.SCR 
  1173. Windows INI Modification                WININIMD.SCR 
  1174. Windows Spooler Setting in INI          WINSPOOL.SCR 
  1175. Install SMRAGENT.EXE                    AGENT.SCR 
  1176. Windows Wallpaper Update                WALLPAPR.SCR 
  1177. CC:MAIL for Windows installation        NETINS.SCR 
  1178.  
  1179. Use the following procedure to incorporate a pre-defined script into  
  1180. BrightWorks. 
  1181.  
  1182. 1.  Choose the Scripts command from the Tools menu. 
  1183.  
  1184.     The Scripts window displays. 
  1185.  
  1186. 2.  Choose the New button. 
  1187.  
  1188.     The Open New Script dialog box displays.   
  1189.  
  1190. 3.  Enter a name for the script in the Script Name field. 
  1191.  
  1192.     The script name can be up to 80 characters, and all typed characters  
  1193.     are valid.  The script name is used within BrightWorks to identify the  
  1194.     script.  For example, if you are incorporating the script which adds a  
  1195.     group to the Program Manager desktop, then you might want to define  
  1196.     the script name as ADD PROGRAM GROUP. 
  1197.  
  1198. 4.  Select the script to be incorporated into BrightWorks. 
  1199.  
  1200.     Select a script from the list of script file names.  For example, if  
  1201.     you want to incorporate and edit the script which adds a group to the  
  1202.     Program Manager desktop, then you would select the ADDGROUP.SCR file. 
  1203.  
  1204. 5.  Choose the OK button. 
  1205.  
  1206.     The Script Editor window displays listing the commands for the chosen  
  1207.     script. 
  1208.  
  1209. 6.  Edit the script commands. 
  1210.  
  1211.     The commands and rules for using the scripting language are documented  
  1212.     in Chapter 22 of this manual, "Software Distribution Script Language." 
  1213.  
  1214. 7.  Choose the Compile button in the Script Editor window to compile the  
  1215.     script. 
  1216.  
  1217.     Refer to section 21.3 entitled "Compiling Scripts" for details on  
  1218.     compiling scripts. 
  1219.  
  1220. 8.  Choose the Save button in the Script Editor window. 
  1221.  
  1222.     The script contents are saved. 
  1223.  
  1224. 9.  Choose the Close button to close the Script Editor window. 
  1225.  
  1226.     The new script is added to the Scripts window.  Note that a script  
  1227.     must be compiled to be used in a package. 
  1228.  
  1229.  
  1230.  
  1231. 22.0 Software Distribution Script Language 
  1232.  
  1233. Chapter 21 discussed creating and managing scripts. This chapter lists the  
  1234. variables and rules for each function in the BrightWorks scripting language. 
  1235.  
  1236. NOTE:  This chapter pertains to BrightWorks. 
  1237.  
  1238.  
  1239. 22.1 Introduction 
  1240.  
  1241. A script is a series of commands to be executed on a remote workstation.   
  1242. Scripts must be written according to a defined syntax, and they must be  
  1243. compiled successfully to be included in a package. 
  1244.  
  1245. The commands and instructions for using the BrightWorks software distribution  
  1246. scripting language are discussed in this chapter.  The procedures for  
  1247. creating, compiling and managing scripts are discussed in the Chapter 21  
  1248. entitled "Scripts." 
  1249.  
  1250. 22.1.1 What's in this Chapter 
  1251.  
  1252. The following chart describes the sections in this chapter: 
  1253.  
  1254. SECTION                         DESCRIPTION 
  1255. Notes on Syntax                 Discusses several items to note regarding  
  1256.                 the general format of the script language  
  1257.                 functions. 
  1258.  
  1259. Script Functions                Discusses the type of functions available,  
  1260.                 and summarizes their parameters and purpose. 
  1261.  
  1262. DOS Functions                   Lists each DOS function, providing the  
  1263.                 following: the function parameters, a  
  1264.                 description, tips for using the function,  
  1265.                 its return values and an example for using  
  1266.                 the function in a script. 
  1267.  
  1268. Easy System File Functions      Lists each Easy System File function,  
  1269.                 providing the same information as above. 
  1270.  
  1271. Windows System File Functions   Lists each Windows System File function,  
  1272.                 providing the same information as above. 
  1273.  
  1274. Miscellaneous Functions         Lists each Miscellaneous function, providing  
  1275.                 the same information as above. 
  1276.  
  1277. Rules and System Variables      Lists the allowable values for each  
  1278.                 parameter, and defines the variable rules. 
  1279.  
  1280. DOS Error Codes                 Lists the DOS error codes that can be  
  1281.                 returned from the script functions. 
  1282.  
  1283.  
  1284.                  
  1285. 22.2 Notes on Syntax 
  1286.  
  1287. The following items must be noted when writing scripts: 
  1288.  
  1289. o  Only one command can be placed on a line. 
  1290.  
  1291. o  The syntax for each command/function is as follows: 
  1292.  
  1293.     FUNC_NAME [parameter1], [parameter2], ...[parameterN] 
  1294.  
  1295. o  Unless otherwise noted, each function returns a 0 if it is successful  
  1296. (i.e., the system variable [retval] is set to 0).  The action to be taken  
  1297. as a result of a script's return code is defined when the script is  
  1298. included in a package.  These "Advanced Package Options" are discussed in  
  1299. Chapter 24.  
  1300.  
  1301. o  Some functions take "optional" parameters.  The administrator should 
  1302. decide whether or not to specify these parameters. If they  
  1303. are not specified, an empty or NULL value must be passed to the compiler to  
  1304. act as a placeholder. 
  1305.  
  1306. For example, the COPY function has the following parameters: 
  1307.  
  1308.     COPY [path] [filewild] [path] {filewild} 
  1309.      
  1310. where the last parameter, {filewild}, is optional.  The COPY command below  
  1311. provides an example for copying all .BAT files from the C: drive to the B:  
  1312. drive, using a placeholder to stand for the last {filewild} parameter:  
  1313.  
  1314.     COPY "C:\" "*.BAT" "B:\" ""  
  1315.  
  1316. In this example, the files are not renamed and retain their original .BAT  
  1317. extensions. 
  1318.  
  1319.  
  1320. 22.3 Script Functions 
  1321.  
  1322. Each script "command" is treated as a "function" (e.g., a C function) that  
  1323. has two basic properties:  
  1324.  
  1325. o  each command has 0 to 4 parameters that it will be passed 
  1326. o  most commands have a return code   
  1327.  
  1328. As such, the script language supports user defined variables (of integer  
  1329. and string type), as well as "system" variables.  When necessary, the  
  1330. functions also implement return values from the parameters that are passed. 
  1331.  
  1332. Each function has one or more parameters that can be passed.  In the  
  1333. following discussions, the required parameters are surrounded by [ ], and  
  1334. the optional parameters are surrounded by {  }.  Each parameter is the  
  1335. name of a rule, whose allowable values are listed later in this chapter. 
  1336.  
  1337. 22.3.1 Type of Functions 
  1338.  
  1339. The script functions are divided into the four major categories summarized  
  1340. below: 
  1341.  
  1342. DOS Functions (section 22.4): 
  1343. FUNCTION        REQUIRED PARAMETERS             DESCRIPTION 
  1344. ATTRIB          [path] [filewild] [attribute]   Changes the attributes of a  
  1345.                         file or multiple files. 
  1346.  
  1347. COPY            [path] [filewild] [path]        Copies a file or files to  
  1348.         {filewild}                      another directory and file  
  1349.                         name(s). 
  1350.  
  1351. DELETEDIR       [path] [filename] {deleteopt}   Deletes a directory. 
  1352.  
  1353. DELETEFILE      [path] [filewild]               Deletes a file or multiple  
  1354.                         files. 
  1355. FINDFILE        [path] [filewild] [strvar]      Finds a file. 
  1356.  
  1357. MDIR            [path] [filename]               Creates a directory. 
  1358.  
  1359. RENAME          [path] [filewild] [path]        Renames a source file(s). 
  1360.         [filewild] 
  1361.  
  1362. UPGRADEOS       [upgopt]                        Upgrades DOS version from  
  1363.                         3.x-5.x to either 5.00  
  1364.                         or 6.00. 
  1365.  
  1366.  
  1367. Easy System File Functions (section 22.5): 
  1368.  
  1369. FUNCTION        REQUIRED PARAMETERS             DESCRIPTION 
  1370. ADDDEVICE       [strvalue1] [strvalue2]         Adds a new DEVICE= line to a  
  1371.         [addopt]                        system file. 
  1372.  
  1373. ADDLINE         [strvalue1] [strvalue2]         Adds a line of text to a  
  1374.         [addopt]                        system file. 
  1375.  
  1376. ADDPATH         [strvalue1] [strvalue2]         Adds a sub-directory to a  
  1377.         [strvalue3] [addopt]            path environment variable. 
  1378.  
  1379. CFGGETVALUE     [strvalue] [intvar]             Gets a numeric variable from  
  1380.                         a system file. 
  1381.  
  1382. CFGSETVALUE     [strvalue] [intvalue]           Sets a numeric variable in a  
  1383.                         system file. 
  1384.                          
  1385. CFGGETSTRING    [strvalue] [strvar]             Gets a string variable from  
  1386.                         a system file. 
  1387.  
  1388. CFGSETSTRING    [strvalue1] [strvalue2]         Sets a string variable in a  
  1389.                         system file. 
  1390.  
  1391. REPLACEKEY      [strvalue1] [strvalue2]         Replaces a key value in a  
  1392.         [strvalue3]                     system file. 
  1393.  
  1394. REPLACELINE     [strvalue1] [strvalue2]         Replaces an existing line in  
  1395.                         a system file with a new line. 
  1396.  
  1397. REPLACELINE-ADD [strvalue1] [strvalue2]         Replaces or adds an existing  
  1398.         [addopt]                        line in a system file. 
  1399.  
  1400. SETSYSFILE      [path] [filename]               Sets a system file to be  
  1401.                         manipulated. 
  1402.  
  1403.  
  1404. Windows System File Functions (section 22.6): 
  1405.  
  1406. FUNCTION        REQUIRED PARAMETERS             DESCRIPTION 
  1407. ADDGROUP        [strvalue]                      Creates a new Program Manager  
  1408.                         group. 
  1409.  
  1410. ADDITEM         [strvalue1] [strvalue2]         Adds a new item to a Program  
  1411.         [pathfile]                      Manager group. 
  1412.  
  1413. GETINIINT       [pathfile] [strvalue1]          Gets a key value (integer)  
  1414.         [strvalue2] [intvar]            from an INI file, and places  
  1415.                         the result in a variable. 
  1416.  
  1417. GETINISTR       [pathfile] [strvalue1]          Gets a key value (string)  
  1418.         [strvalue2] [strvar]            from an INI file, and places  
  1419.                         the result in a variable. 
  1420.  
  1421. SCHEDULEWIN     [path] [filename] [text]        Schedules a file to be run  
  1422.                         the next time the user runs  
  1423.                         Windows. 
  1424.  
  1425. WRITEINIINT     [pathfile] [strvalue1]          Writes a key value (integer)  
  1426.         [strvalue2] [intvalue]          to an INI file  
  1427.          
  1428. WRITEINISTR     [pathfile] [strvalue1]          Writes a key value (string)  
  1429.         [strvalue2] [strvalue3]         to an INI file. 
  1430.  
  1431.  
  1432. Miscellaneous Functions (section 22.7): 
  1433.  
  1434. FUNCTION        REQUIRED PARAMETERS             DESCRIPTION 
  1435. APPENDPATH      [strvar] [strvalue]             Appends the contents of a  
  1436.                         string value to the end of a  
  1437.                         string variable; however, it  
  1438.                         first checks if the last  
  1439.                         character of a string  
  1440.                         variable is a "\".  If it  
  1441.                         is not, APPENDPATH will  
  1442.                         append a "\" and a value to  
  1443.                         the variable. 
  1444.  
  1445. ASSIGN          [intvar] [intvalue]             Performs a basic integer  
  1446.                         assignment operation. 
  1447.  
  1448. DEFINE          [text] [defineopt]              Used to create user defined  
  1449.                         variables of a string or  
  1450.                         integer type. 
  1451.  
  1452. EXIT            [intvalue]                      Ends the script. 
  1453.  
  1454. IF..THEN..ELSE  [intvalue1] [condoper]          Allows conditional processing  
  1455.         [intvalue2]                     of functions. 
  1456.  
  1457. NUMTOSTR        [strvar] [intvalue]             Converts a numeric value to  
  1458.                         a string variable. 
  1459.  
  1460. PAUSE           [text]                          Pauses execution of the  
  1461.                         script until the user presses  
  1462.                         a key. 
  1463.  
  1464. REBOOT                                          Immediately reboots the  
  1465.                         user's PC. 
  1466.  
  1467. SHELL           [pathfile] {text}{shellopt}     Allows a user to execute an  
  1468.                         external DOS batch file or  
  1469.                         executable program. 
  1470.  
  1471. STRCAT          [strvar] [strvalue]             Appends the contents of a  
  1472.                         string value to the end of a  
  1473.                         string variable. 
  1474.  
  1475. STRCOMPARE      [strvar] [strvalue]             Does a byte for byte  
  1476.                         comparison of two strings. 
  1477.  
  1478. STRCOPY         [strvar] [strvalue]             Copies a value into a string,  
  1479.                         overwriting the previous  
  1480.                         contents of the string. 
  1481.  
  1482. WRITELN         [strvalue]                      Writes a string value  
  1483.                         (e.g., write to screen). 
  1484.  
  1485.  
  1486. NOTE:  In the actual script, parameters are separated by a space; do not  
  1487. type the brackets. 
  1488.  
  1489. 22.3.2 User-defined Variables 
  1490.  
  1491. User-defined variables are defined by using the DEFINE command (see  
  1492. Miscellaneous Functions) to create a string or integer user-defined  
  1493. variable name.   
  1494.  
  1495. User-defined variables must be defined before listing any script functions.   
  1496. Also, the appropriate type must be used when calling a function that allows  
  1497. user-defined variable names.  The functions that allow user-defined  
  1498. variables, system variables and literal text use the phrases [strvar]  
  1499. or [intvar] in their parameter listings.  Check the Rules discussion in 
  1500. section 22.7 entitled "Rules and System Variables" for further details. 
  1501.  
  1502.  
  1503. 22.4 DOS Functions 
  1504.  
  1505. The DOS function set is used for managing a machine's files and directories.   
  1506. For example, files can be searched for, copied, deleted, renamed and  
  1507. tagged with a specified attribute; directories can be created and deleted. 
  1508.  
  1509. Return values are generated when appropriate (unless otherwise noted, the  
  1510. functions return 0 if successful).  Any applicable system variables are  
  1511. also noted.   
  1512.  
  1513. Most DOS functions return a DOS error code if unsuccessful.  Refer to the  
  1514. table in section 22.8 entitled "DOS Error Codes" for a list of the DOS error  
  1515. codes that may be returned. 
  1516.  
  1517. NOTES: a - When an "explicit <path>" is mentioned, it can take the form  
  1518. of D:\PATH  (SERVER/VOLUME:\PATH is not currently supported). 
  1519. b -  Some functions take optional "options."  The administrator should 
  1520. decide whether or not to specify these options. 
  1521. c - In the following function specifications, parameters in quotes  
  1522. represent literal parameters; all other parameters represent rules.   
  1523. The rules are listed in section 22.7 entitled "Rules and System Variables." 
  1524.  
  1525. ATTRIB [path] [filewild] [attribute] 
  1526.  
  1527. Parameter       Description and Notes 
  1528. [path]          Source path to files. This path must exist. 
  1529.  
  1530. [filewild]      The file name whose attributes are to be changed. May  
  1531.         contain wildcards (? and *). 
  1532.  
  1533. [attribute]     RO -  Read only   
  1534.         RW - Read/Write 
  1535.         A -    Set Archive bit 
  1536.         SY -   System file 
  1537.         H -    Hidden file 
  1538.         SH -  Shareable (network <path> only) 
  1539.         -A -   Turn off archive attribute 
  1540.         -SY - Turn off system attribute 
  1541.         -H -   Turn off hidden attribute 
  1542.         -SH - Turn off shareable attribute (network <path> only) 
  1543.  
  1544.  
  1545. Description - Changes the attributes of a file or multiple files. 
  1546.  
  1547. Tip - To remove the Read Only attribute, use the RW attribute.   
  1548. (There is no -RO attribute.) 
  1549.  
  1550. Return Values: 
  1551.  
  1552. [RETVAL] = 0 if successful 
  1553.  
  1554. [RETVAL] = -1 if the SH or -SH attributes are used and the drive letter  
  1555. specified in [PATH] is not a network drive 
  1556.  
  1557. [RETVAL] = -2 if the SH or -SH attributes are used and no drive letter is  
  1558. specified in [PATH] 
  1559.  
  1560. [RETVAL] = DOS error code in all other cases 
  1561.  
  1562. Example -  Set the AUTOEXEC.BAT file on a user's boot drive to Read Only: 
  1563.  
  1564.     ATTRIB [BOOT_ROOT] "AUTOEXEC.BAT" RO 
  1565.  
  1566.  
  1567. COPY [path] [filewild] [path] {filewild} 
  1568.  
  1569. Parameter       Description and Notes 
  1570. [path]          Source path of file to be copied. 
  1571.  
  1572. [filewild]      Source file name to be copied. 
  1573.         May contain standard DOS wild cards (? and *). 
  1574.  
  1575. [path]          Destination path. 
  1576.  
  1577. {filewild}      Optional destination file name.  (If not specified, *.*  
  1578.         is assumed.) 
  1579.         May contain standard DOS wild cards (? and *). May be used  
  1580.         to rename file(s) during file copy.  If not used,  
  1581.         the placeholder "" or NULL must be specified. 
  1582.  
  1583.  
  1584. Description - Copies a file or files to another directory and file name(s). 
  1585.  
  1586. Return Values: 
  1587.  
  1588. [RETVAL] = 0 if file(s) are copied correctly 
  1589. [RETVAL] = DOS error code if the function is unsuccessful 
  1590.  
  1591. Example - Copy the WIN.INI file from the Windows directory found at login  
  1592. to the local Windows directory.  Two examples of this are: 
  1593.  
  1594. COPY [WINDIR] "WIN.INI" "C:\WINDOWS" ""  
  1595.  
  1596.                  or 
  1597.  
  1598. COPY [WINDIR] "WIN.INI" "C:\WINDOWS" NULL 
  1599.  
  1600.  
  1601. DELETEDIR [path] [filename] {deleteopt} 
  1602.  
  1603. Parameter       Description and Notes 
  1604. [path]          Source path to the directory to be deleted. This path  
  1605.         must exist. 
  1606.  
  1607. [filename]      Directory name to be deleted. 
  1608.  
  1609. {deleteopt}     Optional delete option: ALL - causes DELETEDIR to delete  
  1610.         the specified directory and everything under it, including  
  1611.         any subdirectories, hidden, system and read only files. If  
  1612.         not used, NULL must be specified. 
  1613.  
  1614.  
  1615. Description - Deletes a directory. 
  1616.  
  1617. Tip - Use the ALL delete option with caution since it can delete entire  
  1618. directory trees. 
  1619.  
  1620. Return Values: 
  1621.  
  1622. [RETVAL] = 0 if the directory is successfully deleted 
  1623. [RETVAL] = DOS error code if the function is unsuccessful 
  1624.  
  1625. Example - Delete the Windows directory found at login and all of its files  
  1626. and sub-directories: 
  1627.  
  1628.     DELETEDIR [WINDIR] ALL 
  1629.  
  1630.  
  1631.  
  1632. DELETEFILE [path] [filewild] 
  1633.  
  1634. Parameter       Description and Notes 
  1635. [path]          Source path to the file(s) to be deleted. This path  
  1636.         must exist. 
  1637.  
  1638. [filewild]      File name(s) to be deleted.  Wild cards may be  
  1639.         specified (? and *) to delete multiple files. 
  1640.  
  1641.          
  1642. Description - Deletes a file or multiple files. 
  1643.  
  1644. Return Values: 
  1645.  
  1646. [RETVAL] = 0 if the file(s) are deleted 
  1647. [RETVAL] = DOS error code if the function is unsuccessful 
  1648.  
  1649. Example - Delete all .DOC files from the F:\UZR\JOHN sub-directory: 
  1650.  
  1651.     DELETEFILE "F:\UZR\JOHN" "*.DOC" 
  1652.  
  1653.  
  1654.  
  1655. FINDFILE [path] [filewild] [strvar] 
  1656.  
  1657. Parameter       Description and Notes 
  1658. [path]          Source path in which to search for files.  This path  
  1659.         must exist. 
  1660.  
  1661. [filewild]      The search criteria. May contain wildcards (? and *). 
  1662.  
  1663. [strvar]        A string variable which contains the file name of the  
  1664.         first file found.  (Before being used as a parameter,  
  1665.         this variable must be defined using the DEFINE function.) 
  1666.  
  1667.  
  1668. Description - Finds a file. 
  1669.  
  1670. Return Values: 
  1671.  
  1672. [RETVAL] = 0 and copies the name of the first file found into [STRVAL]  
  1673. if successful 
  1674. [RETVAL] = -1 and sets [STRVAL] to NULL if no files are found 
  1675.  
  1676. Example -  Test for the presence of the NET.CFG file in the [NET.CFG]  
  1677. directory: 
  1678.  
  1679.     DEFINE "Result" STRING 
  1680.     FINDFILE [NETCFG] "NET.CFG" RESULT 
  1681.  
  1682.  
  1683. MDIR [path] [filename] 
  1684.  
  1685. Parameter       Description and Notes 
  1686. [path]          Path in which to create the new directory. This path  
  1687.         must exist. 
  1688.  
  1689. [filename]      Sub-directory to create. Wild cards may not be specified. 
  1690.  
  1691.  
  1692. Description - Creates a directory. 
  1693.  
  1694. Return Values: 
  1695.  
  1696. [RETVAL] = 0 if the directory is successfully created 
  1697. [RETVAL] = DOS error code if the function is unsuccessful 
  1698.  
  1699. Example - Create the JOHN sub-directory in the UZR directory: 
  1700.  
  1701.     MDIR "F:\UZR" "JOHN" 
  1702.  
  1703.  
  1704.  
  1705. RENAME [path] [filewild] [path] [filewild] 
  1706.  
  1707. Parameter       Description and Notes 
  1708. [path]          Source path to files to be renamed. This path must exist. 
  1709.  
  1710. [filewild]      Source file name to be renamed. May contain wildcards  
  1711.         (? and *). 
  1712.  
  1713. [path]          Destination path (can be different than [path] to enable  
  1714.         moving files, but the drives must be the same). 
  1715.  
  1716. [filewild]      New file name.  May contain wildcards (? and *).   
  1717.         If so, the standards used by the DOS REN command are followed. 
  1718.  
  1719.  
  1720. Description - Renames a source file(s). 
  1721.  
  1722. Return Values: 
  1723.  
  1724. [RETVAL] = 0 if successful 
  1725. [RETVAL] = DOS error code in all other cases 
  1726.  
  1727. Example -  Rename all .BAT files in the C:\ drive to .BAK: 
  1728.  
  1729.     RENAME "C:\" "*.BAT" "C:\" "*.BAK" 
  1730.  
  1731.  
  1732.  
  1733. UPGRADEOS [upgopt] 
  1734.  
  1735. Parameter       Description and Notes 
  1736. [upgopt]        5.00 - upgrade DOS version to 5.00 
  1737.         6.00 - upgrade DOS version to 6.00 
  1738.  
  1739.  
  1740. Description - Upgrades DOS version from 3.x-5x to either 5.00 or 6.00. 
  1741.  
  1742. Tips: 
  1743. 1) In order for BrightWorks to have access to the upgraded DOS files,  
  1744. EQUIP must first be run on a machine that has the desired DOS files.   
  1745. For example, to upgrade a machine's DOS version to 6.00, EQUIP first must  
  1746. be executed on a machine that has DOS 6.00.  By executing EQUIP from the  
  1747. same directory in which the BrightWorks software distribution update  
  1748. program (SDUPDATE.EXE) file is located, the DOS files become accessible  
  1749. by BrightWorks.  Note also that the machine on which EQUIP is run must  
  1750. not contain any system that modifies the machine's boot record  
  1751. (e.g., OS/2, Windows NT). 
  1752.  
  1753. NOTE:  Do not use this function on a workstation that has Windows NT  
  1754. installed in a dual boot configuration.  It will cause the boot menu to be  
  1755. lost.  The PC will boot DOS only. 
  1756.  
  1757. 2) The machine must be rebooted after the script is executed.  Use the  
  1758. REBOOT function as the last script function. 
  1759.  
  1760. Return Values: 
  1761.  
  1762. [RETVAL] = 0 if successful 
  1763. [RETVAL] = DOS error code in all other cases 
  1764.  
  1765. Example -  Upgrade a user's DOS version to 5.00: 
  1766.  
  1767.     UPGRADEOS 5.00 
  1768.     IF [RETVAL]=0 
  1769.         ... 
  1770.         ; copy DOS files, edit CONFIG.SYS, etc. 
  1771.         REBOOT 
  1772.     ENDIF 
  1773.  
  1774.  
  1775.  
  1776. 22.5 Easy System File Functions 
  1777.  
  1778. The Easy System File functions allow for easy manipulation of basic  
  1779. system files, such as CONFIG.SYS, AUTOEXEC.BAT, NET.CFG, or a login script.   
  1780. (Use the Windows System File functions to edit .INI files.) 
  1781.  
  1782. Most Easy System File functions return a DOS error code if unsuccessful.   
  1783. Refer to the table in section 22.8 entitled "DOS Error Codes" for a list of  
  1784. the DOS error codes that may be returned. 
  1785.  
  1786. NOTE:  Prior to using any of the functions in this category, you must call  
  1787. SETSYSFILE.  Also, none of the functions will create a backup of the file  
  1788. that they are modifying; however, a file will not be modified if a function  
  1789. fails.  It is your responsibility to backup any file as necessary. 
  1790.  
  1791. All of the Easy System File functions make use of a "key" value.  This  
  1792. value is used to search the file to aid in determining where to make a  
  1793. modification.  All key searches are case insensitive.  If a key is found,  
  1794. its corresponding value is defined as the first non- whitespace (e.g. tab,  
  1795. cr/lf, =, etc.) group of characters after the found key value.   
  1796. For example, consider the following line: 
  1797.  
  1798.     PATH=C:\DOS;C:\WINDOWS 
  1799.  
  1800. If "PATH" is specified as the key, then the corresponding value is  
  1801. "C:\DOS;C:\WINDOWS."  However, consider the following line: 
  1802.  
  1803.     STACKS 9,256 
  1804.  
  1805. If "STACKS" is specified as the key, then the corresponding value is "9,256."   
  1806. As a result, an equal sign is not necessary to identify a value that  
  1807. you might want to edit. 
  1808.  
  1809. NOTE:  In the following function specifications, parameters in quotes  
  1810. represent literal parameters; all other parameters represent rules.  The  
  1811. rules are listed later in this chapter. 
  1812.  
  1813.  
  1814. ADDDEVICE [strvalue1] [strvalue2] [addopt] 
  1815.  
  1816. Parameter       Description and Notes 
  1817. [strvalue1]     The path and driver name (e.g. C:\WINDOWS\EMM386.EXE). 
  1818.  
  1819. [strvalue2]     The key value to search for (e.g. HIMEM.SYS). 
  1820.  
  1821. [addopt]        Where [strvalue1] is to be placed: either BEFORE or AFTER  
  1822.         [strvalue2]. 
  1823.  
  1824.  
  1825. Description - Adds a new DEVICE= line to a system file (typically the  
  1826. DOS CONFIG.SYS). 
  1827.  
  1828. Tip - If [strvalue2] is a null string or the key is not found, ADDDEVICE  
  1829. will add [strvalue1] in the position of the file indicated by [addopt]. 
  1830.  
  1831. Return Values: 
  1832.  
  1833. [RETVAL] = 0 if successful 
  1834. [RETVAL] = DOS error code in all other cases 
  1835.  
  1836. Example - Place "DEVICE=C:\WINDOWS\EMM386.EXE" after the "DEVICE=HIMEM.SYS"  
  1837. line in the CONFIG.SYS file: 
  1838.  
  1839.     SETSYSFILE "C:\" "CONFIG.SYS" 
  1840.     ADDDEVICE "C:\WINDOWS\EMM386.EXE" "HIMEM.SYS" AFTER 
  1841.      
  1842.  
  1843. ADDLINE [strvalue1] [strvalue2] [addopt] 
  1844.  
  1845. Parameter       Description and Notes 
  1846. [strvalue1]     The entire line of text you wish to add. 
  1847.  
  1848. [strvalue2]     A reference key value to be positioned relative to  
  1849.         [strvalue1].  This is a "keyword" that will be searched  
  1850.         for in the file.  Specify as much or as little as you like.   
  1851.         When the first occurrence of the keyword in a line is found,  
  1852.         that line is used as the reference. 
  1853.  
  1854. [addopt]        Specify where [strvalue1] is to be placed: either BEFORE or  
  1855.         AFTER [strvalue2]. 
  1856.  
  1857.  
  1858. Description - Adds a line of text to a system file. 
  1859.  
  1860. Tip - If [strvalue2] is a null string, ADDLINE will place [strvalue1] in  
  1861. the position of the file indicated by [addopt]. 
  1862.  
  1863. Return Values: 
  1864.  
  1865. [RETVAL] = 0 if successful 
  1866. [RETVAL] = DOS error code in all other cases 
  1867.  
  1868. Example -  Add a new line to the end of a user's CONFIG.SYS file: 
  1869.  
  1870.     SETSYSFILE "C:\" "CONFIG.SYS" 
  1871.     ADDLINE "THIS IS NEW.." "" AFTER 
  1872.  
  1873. NOTE:  As in the example above, non-specified parameters  
  1874. (e.g., [strvalue2]) can be indicated by empty quotes.  Entering NULL  
  1875. with no quotes is also acceptable. 
  1876.  
  1877.  
  1878.  
  1879. ADDPATH [strvalue1] [strvalue2] [strvalue3] [addopt] 
  1880.  
  1881. Parameter       Description and Notes 
  1882. [strvalue1]     The name of the path environment variable to edit (PATH for  
  1883.         DOS, or DPATH for OS/2, or TEMP, etc). 
  1884.  
  1885. [strvalue2]     The sub-directory to be added. 
  1886.  
  1887. [strvalue3]     The sub-directory that [strvalue2] will be placed either  
  1888.         before or after. 
  1889.  
  1890. [addopt]        Specify where [strvalue2] is to be placed: either BEFORE  
  1891.         or AFTER [strvalue3]. 
  1892.  
  1893.  
  1894. Description - Adds a sub-directory to a path environment variable. 
  1895.  
  1896. Tips: 
  1897.  
  1898. 1) If [strvalue3] is a null string, ADDPATH will place [strvalue2] in the  
  1899. position of the path statement indicated by [addopt] (i.e., the new path  
  1900. will be placed at the beginning or end of the path statement).  
  1901.  
  1902. 2) If the key specified in [strvalue1] is not found, then a new one is  
  1903. added, with a "SET" prepended.  This allows for adding path like environment  
  1904. variables such as "SET TEMP=", and so on.  
  1905.  
  1906. 3) This function can also be used to edit other lines such as a TEMP  
  1907. environment variable, or any other line that does something like  
  1908. "SET envvar=d:\path." 
  1909.  
  1910. Return Values: 
  1911.  
  1912. [RETVAL] = 0 if successful 
  1913. [RETVAL] = DOS error code in all other cases 
  1914.  
  1915. Example -  Add the sub-directory WINDOWS to the path and place it before  
  1916. the DOS variable in the AUTOEXEC.BAT file: 
  1917.  
  1918.     SETSYSFILE "C:\" "AUTOEXEC.BAT" 
  1919.     ADDPATH "PATH" "C:\WINDOWS" "C:\DOS" BEFORE 
  1920.  
  1921.  
  1922.  
  1923. CFGGETVALUE [strvalue] [intvar] 
  1924.  
  1925. Parameter       Description and Notes 
  1926. [strvalue]      The variable to be retrieved. 
  1927.  
  1928. [intvar]        An integer variable to hold the retrieved value.   
  1929.         (Before being used as a parameter, this variable must  
  1930.         be defined using the DEFINE function.) 
  1931.  
  1932.  
  1933. Description - Gets a numeric variable from a system file (e.g., FILES,  
  1934. BUFFERS, etc.). 
  1935.  
  1936. Tip - If the value of the key specified is non-numeric (e.g., the DOS=HIGH),  
  1937. CFGGETVALUE sets parameter 2 to 0, but does not return an error code.   
  1938. Use CFGGETSTRING to get a string value. 
  1939.  
  1940. Return Values: 
  1941.  
  1942. [RETVAL] = 0 if successful 
  1943. [RETVAL] = -2 if the key value could not be found 
  1944. [RETVAL] = DOS error code in all other cases 
  1945.  
  1946. Example - Place the value of the FILES= statement in the CONFIG.SYS file  
  1947. into a user defined variable called nRESULT (which must first be defined!): 
  1948.  
  1949.     DEFINE "nRESULT" STRING 
  1950.     SETSYSFILE "C:\" "CONFIG.SYS" 
  1951.     CFGGETVALUE "FILES" nRESULT 
  1952.  
  1953.  
  1954.  
  1955. CFGSETVALUE [strvalue] [intvalue] 
  1956.  
  1957. Parameter       Description and Notes 
  1958. [strvalue]      The variable to be set. 
  1959.  
  1960. [intvalue]      The integer value. 
  1961.  
  1962.  
  1963. Description - Sets a numeric variable in a system file (e.g., FILES,  
  1964. BUFFERS, etc.). 
  1965.  
  1966. Tip: Use ADDLINE to add a new statement if one does not exist. 
  1967.  
  1968. Return Values: 
  1969.  
  1970. [RETVAL] = 0 if successful 
  1971. [RETVAL] = -2 if the key value could not be found 
  1972. [RETVAL] = DOS error code in all other cases 
  1973.  
  1974. Example - Set the value of the FILES= statement in the CONFIG.SYS file to 50,  
  1975. provided a FILES= statement already exists in the file: 
  1976.  
  1977.     SETSYSFILE "C:\" "CONFIG.SYS" 
  1978.     CFGSETVALUE "FILES" 50 
  1979.     CFGGETSTRING [strvalue] [strvar] 
  1980.     CFGSETSTRING [strvalue1] [strvalue2] 
  1981.  
  1982. These two functions act exactly the same as CFG???VALUE, except they deal  
  1983. with string values rather than integer values.  An administrator might use  
  1984. this to check non-numeric variables (e.g., STACKS=9,256 is a non numeric  
  1985. value). 
  1986.  
  1987. Note that before using the [strvar] variable as a parameter, the variable  
  1988. must be defined using the DEFINE function. 
  1989.  
  1990.  
  1991.  
  1992. REPLACEKEY [strvalue1] [strvalue2] [strvalue3] 
  1993.  
  1994. Parameter       Description and Notes 
  1995. [strvalue1]     The line in the system file which contains the key value  
  1996.         to be replaced. 
  1997.  
  1998. [strvalue2]     The key value to be replaced. 
  1999.  
  2000. [strvalue3]     The new value. 
  2001.  
  2002.  
  2003. Description - Similar to REPLACELINE; however, it replaces a key value  
  2004. rather than the entire line. 
  2005.  
  2006. Tip - If [strvalue3] is a null string, [strvalue2] will be removed. 
  2007.  
  2008. Return Values: 
  2009.  
  2010. [RETVAL] = 0 if successful 
  2011. [RETVAL] = DOS error code in all other cases 
  2012.  
  2013. Example -  Change the "40" to a "50" in the FILES= line in the CONFIG.SYS  
  2014. file: 
  2015.  
  2016.     SETSYSFILE "C:\" "CONFIG.SYS" 
  2017.     REPLACEKEY "FILES=40" "40" "50" 
  2018.  
  2019.  
  2020.  
  2021. REPLACELINE [strvalue1] [strvalue2] 
  2022.  
  2023. Parameter       Description and Notes 
  2024. [strvalue1]     The key value of the line you wish to replace, such as PATH,  
  2025.         COMSPEC or DEVICE. 
  2026.  
  2027. [strvalue2]     The new value of the entire line. 
  2028.  
  2029.  
  2030. Description - Replaces an existing line in a system file with a new line. 
  2031.  
  2032. Tips: 
  2033.  
  2034. 1) If [strvalue2] is a null string, then the line will be deleted. 
  2035.  
  2036. 2) If the key value exists more than one time in the file, only the first  
  2037. instance is modified.  
  2038.  
  2039. Return Values: 
  2040.  
  2041. [RETVAL] = 0 if successful 
  2042. [RETVAL] = DOS error code in all other cases 
  2043.  
  2044. Example - Replace the existing COMSPEC line in the CONFIG.SYS file with a  
  2045. new line: 
  2046.  
  2047.     SETSYSFILE "C:\" "CONFIG.SYS" 
  2048.     REPLACELINE "COMSPEC" "SET COMSPEC=C:\DRDOS\COMMAND.COM" 
  2049.      
  2050.  
  2051. REPLACELINEADD [strvalue1] [strvalue2] [addopt] 
  2052.  
  2053. Parameter       Description and Notes 
  2054. [strvalue1]     The key value of the line you wish to replace, such as PATH,  
  2055.         COMSPEC or DEVICE. 
  2056.  
  2057. [strvalue2]     The new value of the entire line. 
  2058.  
  2059. [addopt]        Where [strvalue1] is to be placed: either BEFORE or AFTER  
  2060.         [strvalue2]. 
  2061.  
  2062.  
  2063. Description - Similar to REPLACELINE, this function replaces an existing  
  2064. line in a system file with a new line.  However, if the key specified in  
  2065. [strvalue1] is not found, then the line specified in [strvalue2] is added  
  2066. to the file, at the beginning or end of the file depending on the position  
  2067. defined by [addopt]. 
  2068.  
  2069. Tip: If [strvalue1] is not found, then the line specified as [strvalue2]  
  2070. will be added to the file in the position defined by [addopt]. 
  2071.  
  2072. Return Values: 
  2073.  
  2074. [RETVAL] = 0 if successful 
  2075. [RETVAL] = DOS error code in all other cases 
  2076.  
  2077. Example - Replace the existing NETX line with the new line C:\NET\VLM.   
  2078. If NETX is not found, then the line will be appended to the end of the file: 
  2079.  
  2080.     SETSYSFILE "C:\" "NET.BAT" 
  2081.     REPLACELINEADD "NETX" "C:\NET\VLM" AFTER 
  2082.  
  2083.  
  2084.  
  2085. SETSYSFILE [path] [filename] 
  2086.  
  2087. Parameter       Description and Notes 
  2088. [path]          The path to the file to be modified.  
  2089.  
  2090. [filename]      The name of the file to be modified. 
  2091.  
  2092.  
  2093. Description - Sets a system file to be manipulated. 
  2094.  
  2095. Tips: 
  2096.  
  2097. 1) This function must be called prior to calling any of the functions in  
  2098. the Easy System File function category.  It needs to be called only once,  
  2099. unless you change the file you are working on in the script. 
  2100.  
  2101. 2) Using [BOOT_ROOT] as the [path] parameter will always modify the file on  
  2102. the boot disk, regardless of whether or not the user is given the option to  
  2103. override the installation path (in the package definition).  Use [TARGET]  
  2104. as the [path] parameter if the user is given the option to override the  
  2105. installation path. 
  2106.  
  2107. Return Values: 
  2108.  
  2109. [RETVAL] = 0 if file is found 
  2110. [RETVAL] = 2 if file is not found 
  2111.  
  2112. Example -  Designate a user's CONFIG.SYS file as the file to be edited.   
  2113. Two examples of this are: 
  2114.  
  2115.     SETSYSFILE "C:\" "CONFIG.SYS" 
  2116.     or 
  2117.     SETSYSFILE [BOOT_ROOT] "CONFIG.SYS" 
  2118.  
  2119.  
  2120. 22.6 Windows System File Functions 
  2121.  
  2122. The Windows System File functions provide the ability to edit INI files  
  2123. and create and manipulate Program Manager groups. 
  2124.  
  2125. NOTES:  a - In the following function specifications, parameters in  
  2126. quotes represent literal parameters; all other parameters represent rules.   
  2127. The rules are listed in section 22.8 entitled "DOS Error Codes." 
  2128. b - Many of the Windows System File functions have a [pathfile] parameter  
  2129. which specifies the path name and file name to an INI file.  If you do  
  2130. not specify a full path to the Windows directory, then the actions  
  2131. performed by these functions occur on the first instance of Windows found,  
  2132. as determined by the path statement of the receiving machine.  If Windows  
  2133. is not found in the path, then the distribution update program will search  
  2134. for the INI file in [BOOT_ROOT]\WINDOWS.  If Windows is still not found,  
  2135. the update program will then try [BOOT_ROOT]\WIN31. 
  2136. c - The functions ADDGROUP, ADDITEM, and SCHEDULEWIN use the WSDUPD.EXE  
  2137. update program which is copied into the local Windows directory each  
  2138. time these functions are used.  The next time the user runs Windows,  
  2139. WSDUPD.EXE runs and executes the appropriate function(s).  It then deletes  
  2140. WSDUPD.EXE and WSDUPD.INI.  If a user has SHARE.EXE loaded, a  
  2141. "sharing violation" message will display when trying to delete WSDUPD.EXE.   
  2142. This message can be ignored. 
  2143.  
  2144.  
  2145. ADDGROUP [strvalue]   
  2146.  
  2147. Parameter       Description and Notes 
  2148. [strvalue]      The string which specifies the name of the Program Manager  
  2149.         group to be added. 
  2150.  
  2151.  
  2152. Description - Creates a new Program Manager group. 
  2153.  
  2154. Tip: When the ADDGROUP script function is executed, the BrightWorks  
  2155. software distribution update program WSDUPD.EXE is automatically copied  
  2156. into the workstation's Windows directory.  The WSDUPD.EXE command is also  
  2157. added to the "Load=" line in the WIN.INI file.  The next time Windows is  
  2158. run at the workstation, the function is executed and WSDUPD.EXE is removed  
  2159. from the WIN.INI "Load=" line. 
  2160.  
  2161. Return Values: 
  2162.  
  2163. [RETVAL] = 0 if successful 
  2164. [RETVAL] = DOS error code if unsuccessful.  The function might fail if  
  2165. WSDUPD.EXE could not be copied into the Windows directory or if the  
  2166. WSDUPD.EXE control file (WSDUPD.INI) could not be created. 
  2167.  
  2168. Example -  Create a Program Manager group named COMPANY: 
  2169.  
  2170.     ADDGROUP "COMPANY" 
  2171.  
  2172. NOTE:  This function can be used with any third party shell program which  
  2173. emulates the Program Manager DDE interface. 
  2174.  
  2175.  
  2176.  
  2177. ADDITEM [strvalue1] [strvalue2] [pathfile]  
  2178.  
  2179. Parameter       Description and Notes 
  2180. [strvalue1]     The group to which the item will be added. 
  2181.  
  2182. [strvalue2]     The name of the new item. 
  2183.  
  2184. [pathfile]      The .EXE file to be associated with the new item. 
  2185.  
  2186.  
  2187. Description - Adds a new item to a Program Manager group. 
  2188.  
  2189. Tip: When the ADDITEM script function is executed, the BrightWorks  
  2190. software distribution update program WSDUPD.EXE is automatically copied  
  2191. into the workstation's Windows directory.  The WSDUPD.EXE command is  
  2192. also added to the "Load=" line in the WIN.INI file.  The next time  
  2193. Windows is run at the workstation, the function is executed and WSDUPD.EXE  
  2194. is removed from the WIN.INI "Load=" line. 
  2195.  
  2196. Return Values: 
  2197.  
  2198. [RETVAL] = 0 if successful 
  2199. [RETVAL] = DOS error code if unsuccessful.  The function might fail if  
  2200. WSDUPD.EXE could not be copied into the Windows directory or if the  
  2201. WSDUPD.EXE control file (WSDUPD.INI) could not be created. 
  2202.  
  2203. Example -  Create a Program Manager group named APPS, and then create a  
  2204. program icon within the new APPS group named EXCEL: 
  2205.  
  2206.     ADDGROUP "APPS" 
  2207.     ADDITEM "APPS" "EXCEL" "U:\MS\EXCEL\EXCEL.EXE" 
  2208.  
  2209. NOTE:  This function can be used with any third party shell program which  
  2210. emulates the Program Manager DDE interface. 
  2211. Also note that the path specified will appear in the command line as well as 
  2212. the working directory. The above EXCEL example demonstrates this. 
  2213.  
  2214.  
  2215.  
  2216. GETINIINT [pathfile] [strvalue1] [strvalue2] [intvar] 
  2217.  
  2218. This function works in exactly the same way as GETINISTR (below) except  
  2219. it is used to retrieve integer values from INI files. 
  2220.  
  2221.  
  2222.  
  2223. GETINISTR [pathfile] [strvalue1] [strvalue2] [strvar] 
  2224.  
  2225. Parameter       Description and Notes 
  2226. [pathfile]      The path and file name of the INI file. 
  2227.  
  2228. [strvalue1]     The section of the INI file in which the entry is located  
  2229.         (e.g., [386Enh]). 
  2230.  
  2231. [strvalue2]     The entry whose associated string is to be retrieved  
  2232.         (e.g., keyboard.drv=, however, do not include the = sign!). 
  2233.  
  2234. [strvar]        Variable in which to place the found string.  (Before being  
  2235.         used as a parameter, this variable must be defined using  
  2236.         the DEFINE function.) 
  2237.  
  2238.  
  2239. Description - Gets a key value (string) from an INI file, and places the  
  2240. result in a variable. 
  2241.  
  2242. Tip - If [strvalue2] is a null string or the key is not found, ADDDEVICE  
  2243. will add [strvalue1] in the position of the file indicated by [addopt]. 
  2244.  
  2245. Return Values: 
  2246.  
  2247. [RETVAL] = 0 if successful 
  2248. [RETVAL] = -1 if the [strvalue2]  section name does not exist 
  2249. [RETVAL] = -2 if the [strvalue3]  key does not exist 
  2250. [RETVAL] = DOS error code in all other cases 
  2251.  
  2252. Example -  Determine whether Windows version 3.1 is installed at a  
  2253. workstation by looking at the CONTROL.INI file:  
  2254.  
  2255.     DEFINE "VER" STRING 
  2256.     GETINISTR "C:\WIN\CONTROL.INI" "[INSTALLED]" "3.1" VER 
  2257.  
  2258.  
  2259.  
  2260. SCHEDULEWIN [path] [filename] [text] 
  2261.  
  2262. Parameter       Description and Notes 
  2263. [path]          The path to the file to be run. 
  2264.  
  2265. [filename]      The file name to be run upon Windows execution. 
  2266.  
  2267. [text]          Optional command line arguments for the file. 
  2268.  
  2269.  
  2270. Description - Schedules a file to be run the next time the user runs Windows. 
  2271.  
  2272. Tip - This function could be used to automate the installation of a  
  2273. Windows program if a macro playback utility is used. 
  2274.  
  2275. Return Values: 
  2276.  
  2277. [RETVAL] = 0 if successful 
  2278. [RETVAL] = DOS error code if unsuccessful.  The function might fail if  
  2279. WSDUPD.EXE could not be copied into the Windows directory or if the  
  2280. WSDUPD.EXE control file (WSDUPD.INI) could not be created. 
  2281.  
  2282. Example -  Schedule the Notepad program to run the next time Windows is run,  
  2283. and also open the README.TXT notepad file: 
  2284.  
  2285.     SCHEDULEWIN "C:\WINDOWS" "NOTEPAD.EXE" "README.TXT" 
  2286.      
  2287.      
  2288. WRITEINIINT [pathfile] [strvalue1] [strvalue2] [intvalue] 
  2289.  
  2290. This function works exactly like WRITEINISTR (below), except that it is  
  2291. used to write an integer value to an INI file. 
  2292.  
  2293.  
  2294. WRITEINISTR [pathfile] [strvalue1] [strvalue2] [strvalue3] 
  2295.  
  2296. Parameter       Description and Notes 
  2297. [pathfile]      The path and file name of the INI file. 
  2298.  
  2299. [strvalue1]     The section in which [strvalue2] is located (e.g., [386Enh]). 
  2300.  
  2301. [strvalue2]     The entry whose associated string is to be modified  
  2302.         (e.g., keyboard.drv=, however, don't include the = sign!). 
  2303.  
  2304. [strvalue3]     The string to be written to the INI file. 
  2305.  
  2306.  
  2307. Description - Gets a key value (string) from an INI file, and writes the  
  2308. result to the INI file. 
  2309.  
  2310. Tips: 
  2311.  
  2312. 1) If the section name specified in [strvalue1] is not found, then it will  
  2313. be added to the end of the INI file, with a new key=value added in that  
  2314. section. 
  2315.  
  2316. 2) If the [strvalue1] section is found but the key value specified in  
  2317. [strvalue2] is not found, the new key value is added directly after the  
  2318. section name [strvalue1]. 
  2319.  
  2320. Return Values: 
  2321.  
  2322. [RETVAL] = 0 if successful 
  2323. [RETVAL] = DOS error code in all other cases 
  2324.  
  2325. Example -  Define a "medium priority" in the [SPOOLER] section of the  
  2326. WIN.INI file:  
  2327.  
  2328.     WRITEINISTR "C:\WIN\WIN.INI" "[SPOOLER]" "PRIORITY" "MEDIUM" 
  2329.  
  2330.  
  2331.  
  2332. 22.7 Miscellaneous Functions 
  2333.  
  2334. The Miscellaneous Functions include basic functions for defining, assigning,  
  2335. copying, comparing and concatenating variables. 
  2336.  
  2337. NOTE:  In the following function specifications, parameters in quotes  
  2338. represent literal parameters; all other parameters represent rules.   
  2339. The rules are listed in section 22.8 entitled "DOS Error Codes."  
  2340.  
  2341.  
  2342. APPENDPATH [strvar] [strvalue] 
  2343.  
  2344. Parameter       Description and Notes 
  2345. [strvar]        The variable to contain the appended string  
  2346.         (i.e., destination).  (Before being used as a parameter,  
  2347.         this variable must be defined using the DEFINE function.) 
  2348.  
  2349. [strvalue]      The string value to be appended (i.e., source). 
  2350.  
  2351.  
  2352. Description - Adds a file name to a path or builds a path.  This function  
  2353. acts the same way as STRCAT, except that it will check if the last  
  2354. character of [strvar] is a "\".  If it is not, APPENDPATH will append  
  2355. a "\" to [strvar], and then [strvalue] will be appended.  This is very  
  2356. useful (and necessary!) in building paths. 
  2357.  
  2358. Return Value: 
  2359.  
  2360. [RETVAL] = 0 always 
  2361.  
  2362. Example - Define the variable named PATH to be a string-type.  Copy the  
  2363. location of the network configuration files into the PATH variable and  
  2364. then append it to the C:\DRIVERS directory. 
  2365.  
  2366.     DEFINE "PATH" STRING 
  2367.     STRCOPY PATH [NETCFG] 
  2368.     APPENDPATH "C:\DRIVERS" PATH 
  2369.  
  2370.  
  2371.  
  2372. ASSIGN [intvar] [intvalue] 
  2373.  
  2374. Parameter       Description and Notes 
  2375. [intvar]        The integer type variable name which will be assigned a  
  2376.         value.  (Before being used as a parameter, this variable  
  2377.         must be defined using the DEFINE function.) 
  2378.          
  2379. [intvalue]      The numeric value to be assigned to the integer type variable. 
  2380.  
  2381.  
  2382. Description - Performs a basic integer assignment operation (e.g., a = b). 
  2383.  
  2384. Return Value: 
  2385.  
  2386. [RETVAL] = 0 always 
  2387.  
  2388. Example -  Define the variable "NUM" as an integer type, and later assign  
  2389. 33 to the variable NUM:  
  2390.  
  2391.     DEFINE "NUM" INTEGER 
  2392.     ASSIGN NUM 33 
  2393.  
  2394.  
  2395.  
  2396. DEFINE [text] [defineopt] 
  2397.  
  2398. Parameter       Description and Notes 
  2399. [text]          The variable being defined. 
  2400.  
  2401. [defineopt]     The type of variable being defined (e.g., STRING or INTEGER). 
  2402.  
  2403.  
  2404. Description - Used to create user defined variables of a string or integer  
  2405. type.  This variable can then be used later in the script. 
  2406.  
  2407. Tips: 
  2408. 1) All DEFINE statements must be declared before any script command  
  2409. is executed. 
  2410.  
  2411. 2)  If a STRING type variable is declared, the login module will allocate  
  2412. 255 bytes (= 255 characters) of memory for the string.  If an INTEGER  
  2413. type variable is declared, the login module will allocate 4 bytes (C type  
  2414. long which equals to an approximately -2 billion to +2 billion size integer).  
  2415.  
  2416. Return Value: 
  2417.  
  2418. [RETVAL] = 0 always 
  2419.  
  2420. Example -  Define the variable "ANSWER" as a string type. 
  2421.  
  2422.     DEFINE "ANSWER" STRING 
  2423.  
  2424.  
  2425.  
  2426. EXIT [intvalue] 
  2427.  
  2428. Parameter       Description and Notes 
  2429. [intvalue]      An integer type variable. 
  2430.  
  2431.  
  2432. Description - Ends the script. 
  2433.  
  2434. Tips: 
  2435.  
  2436. 1) If [intvalue] is set to a non-zero value, then the login module will  
  2437. increment the error count by one for the upgrade package and note the log  
  2438. with the error number returned. 
  2439.  
  2440. 2) If the package has been defined to execute the script before decompressing  
  2441. the fileset, then the EXIT command will prevent the decompression of the  
  2442. fileset.  (For more information on defining "Advanced Package Options,"  
  2443. refer to the section later in this chapter.) 
  2444.  
  2445. Return Value: none 
  2446.  
  2447. Example -  End the script if an obtained value is greater than 50: 
  2448.  
  2449.     IF RESULT <= 50 
  2450.         CFGSETVALUE "FILES" 55 
  2451.     ELSE 
  2452.         EXIT 1 
  2453.     ENDIF 
  2454.  
  2455.  
  2456. IF [intvalue1] [condoper] [intvalue2] ... {ELSE...} ENDIF 
  2457.  
  2458. Parameter       Description and Notes 
  2459. [intvalue1]     An integer type variable to be evaluated against [intvalue2]. 
  2460.  
  2461. [condoper]      Valid conditional operators are: =, !=, <, >, <=, >= 
  2462.  
  2463. [intvalue2]     An integer type variable to evaluate [intvalue1] against. 
  2464.  
  2465. Description - Allows conditional processing of functions.  IF..THEN  
  2466. evaluates the conditional expression defined by [intvalue1] [condoper]  
  2467. [intvalue2].  If the condition evaluates to be TRUE, then all functions  
  2468. following THEN are executed until an ELSE or ENDIF is reached.  If the  
  2469. condition evaluates to FALSE and ELSE is defined, then all functions  
  2470. following the ELSE are executed until an ENDIF is reached.   
  2471.  
  2472. Tip - IFs can be nested up to 50 levels deep. 
  2473.  
  2474. Return Value: none 
  2475.  
  2476. Example -  Obtain the FILES= value from the CONFIG.SYS file.  If the value  
  2477. is less than or equal to 50, then change the value to 55; otherwise, exit  
  2478. the script: 
  2479.  
  2480.     DEFINE "RESULT" INTEGER 
  2481.     SETSYSFILE "C:\" "CONFIG.SYS" 
  2482.     CFGGETVALUE "FILES" RESULT 
  2483.     IF RESULT <= 50 
  2484.         CFGSETVALUE "FILES" 55 
  2485.     ELSE 
  2486.         EXIT 1 
  2487.     ENDIF 
  2488.  
  2489.  
  2490. NUMTOSTR [strvar] [intvalue] 
  2491.  
  2492. Parameter       Description and Notes 
  2493. [strvar]        The variable to contain the converted value.  (Before being  
  2494.         used as a parameter, this variable must be defined using  
  2495.         the DEFINE function.) 
  2496.  
  2497. [intvalue]      The numeric value to be converted. 
  2498.  
  2499.  
  2500. Description - Converts a numeric value to a string variable. 
  2501.  
  2502. Return Value: 
  2503.  
  2504. [RETVAL] = 0 always 
  2505.  
  2506. Example -  Convert the number 100 to a string and store the value in the  
  2507. defined variable named ONEHUNDRED: 
  2508.  
  2509.     DEFINE "ONEHUNDRED" STRING 
  2510.     NUMTOSTR ONEHUNDRED 100 
  2511.  
  2512.  
  2513. PAUSE [text] 
  2514.  
  2515. Parameter       Description and Notes 
  2516. [text]          The text to be displayed on the user's screen during the  
  2517.         pause. (This can be NULL) 
  2518.  
  2519.  
  2520. Description - Pauses execution of the script until the user presses a key. 
  2521.  
  2522. Tip - If [text]1 is NULL, then the default message "Strike any key to  
  2523. continue" is displayed on the screen. 
  2524.  
  2525. Return Value = 0 always 
  2526.  
  2527. Example -  Display the message "Pausing... press any key to continue"  
  2528. during script execution. 
  2529.  
  2530.     PAUSE "PAUSING ... PRESS ANY KEY TO CONTINUE." 
  2531.  
  2532.  
  2533.  
  2534. REBOOT 
  2535.  
  2536. This function immediately reboots the user's PC.  It does not accept any  
  2537. parameters and does not return any values.  Before the reboot, the script  
  2538. file is closed, the log database is closed, and any necessary cleanup is  
  2539. performed. 
  2540.  
  2541. NOTES: a - The PC will not reboot if a fileset is to be executed after the  
  2542. script. 
  2543. b -  The REBOOT function might not work if the workstation is not 100% PC  
  2544. compatible. 
  2545.  
  2546.  
  2547. SHELL [pathfile] {text} {shellopt} 
  2548.  
  2549. Parameter       Description and Notes 
  2550. [pathfile]      The path and file name to execute. 
  2551. {text}          The file's optional command line arguments.  (This can be  
  2552.         NULL.) 
  2553.  
  2554. {shellopt}      Optional argument which can only be either [KEEPPATH] or NULL. 
  2555.  
  2556.  
  2557. Description - Allows a user to execute an external DOS batch file,  
  2558. executable program, or DOS command. 
  2559.  
  2560. Tip - To execute the program or batch file in [pathfile] and change to the  
  2561. specified path, use the KEEPPATH option as the {shellopt} parameter.  If  
  2562. you don't specify the KEEPPATH option, SHELL will try to use the path from  
  2563. which the SDUPDATE program was run.  KEEPPATH allows you to temporarily  
  2564. switch to the path from where you want to run the program. 
  2565.  
  2566. Return Values: 
  2567.  
  2568. [RETVAL] = 0 if successful 
  2569. [RETVAL] = -1 if failed 
  2570.  
  2571. Example -  Execute LIST.COM and load the contents of the README.TXT file.  
  2572. Temporarily make the current directory C:\PUB\LIST.COM. 
  2573.  
  2574.     SHELL "C:\PUB\LIST.COM" "README.TXT" "" KEEPPATH 
  2575.  
  2576.  
  2577. STRCAT [strvar] [strvalue] 
  2578.  
  2579. Parameter       Description and Notes 
  2580. [strvar]        The variable to contain the concatenated string  
  2581.         (i.e., destination).  (Before being used as a parameter,  
  2582.         this variable must be defined using the DEFINE function.) 
  2583.  
  2584. [strvalue]      The string value to be appended (i.e., source). 
  2585.  
  2586.  
  2587. Description - Appends the contents of [strvalue] to the end of the string  
  2588. [strvar]. 
  2589.  
  2590. Tip - If the resulting text in [strvar] is longer than the space allowed  
  2591. (255 bytes), then it will be truncated and properly null terminated. 
  2592.  
  2593. Return Value: 
  2594.  
  2595. [RETVAL] = 0 always 
  2596.  
  2597. Example -  Add the string "ADDTHIS" to a string variable named STRINGS1&2: 
  2598.  
  2599.     DEFINE "STRINGS1&2" STRING 
  2600.     STRCAT STRINGS1&2 "ADDTHIS" 
  2601.  
  2602.  
  2603. STRCOMPARE [strvar] [strvalue] 
  2604.  
  2605. Parameter       Description and Notes 
  2606. [strvar]        The variable to be compared.  (Before being used as a  
  2607.         parameter, this variable must be defined using the  
  2608.         DEFINE function.) 
  2609.  
  2610. [strvalue]      The value to compare the variable against.  
  2611.  
  2612.  
  2613. Description - Does a byte for byte comparison of two strings. 
  2614.  
  2615. Return Values: 
  2616.  
  2617. [RETVAL] = 0 if the strings are identical 
  2618. [RETVAL] = < 0 if [strvar] is less than [strvalue] 
  2619. [RETVAL] =  > 0 if [strvar] is greater than [strvalue] 
  2620.  
  2621. Example -  Check the current NetWare login name against a specified login  
  2622. name ("Supervisor"). 
  2623.  
  2624.     DEFINE "NAME" STRING 
  2625.     STRCOPY NAME [LOGINNAME] 
  2626.     STRCOMPARE NAME "SUPERVISOR" 
  2627.  
  2628.  
  2629. STRCOPY [strvar] [strvalue] 
  2630.  
  2631. Parameter       Description and Notes 
  2632. [strvar]        The variable to receive the copied string value  
  2633.         (i.e., destination).  (Before being used as a parameter,  
  2634.         this variable must be defined using the DEFINE function.) 
  2635.  
  2636. [strvalue]      The string value to be copied (i.e., source). 
  2637.  
  2638.  
  2639. Description - Copies a value into a string, overwriting the previous  
  2640. contents of the string. 
  2641.  
  2642. Return Value: 
  2643.  
  2644. [RETVAL] = 0 always 
  2645.  
  2646. Example -  Copy the string "ABC" into the string variable named "HOLDABC": 
  2647.  
  2648.     DEFINE "HOLDABC" STRING 
  2649.     STRCOPY HOLDABC "ABC" 
  2650.  
  2651.  
  2652. WRITELN [strvalue] 
  2653.  
  2654. Parameter       Description and Notes 
  2655. [strvalue]      The string to display on screen. 
  2656.  
  2657.  
  2658. Description - Writes the [strvalue] line to stdout (e.g., the screen).   
  2659. This might be useful for displaying error messages, etc. 
  2660.  
  2661. Return Value: 
  2662.  
  2663. [RETVAL] = 0 always 
  2664.  
  2665. Example -  Define the variable named RESULT.  Place the value of the  
  2666. FILES= statement in the CONFIG.SYS file into RESULT, and then write the  
  2667. value of RESULT. 
  2668.  
  2669.     DEFINE "VALUE" STRING 
  2670.     DEFINE "RESULT" INTEGER 
  2671.     SETSYSFILE "C:\" "CONFIG.SYS" 
  2672.     CFGGETVALUE "FILES" RESULT 
  2673.     NUMTOSTR VALUE RESULT 
  2674.     WRITELN VALUE 
  2675.  
  2676.  
  2677.  
  2678. 22.8 Rules and System Variables 
  2679.  
  2680. Most of the functions in the BrightWorks script language have parameters  
  2681. that are specified or passed to them.  The valid entries for each parameter  
  2682. type are called rules.  For example, the UPGRADEOS function has one  
  2683. parameter named [upgopt].  As indicated in the table below, the value of  
  2684. the [upgopt] parameter can be either 5.00 or 6.00.  Therefore, the  
  2685. allowable values for the [upgopt] parameter are 5.00 and 6.00. 
  2686.  
  2687. NOTE:  When a user defined variable of string type is expected, [STRVAR] is  
  2688. the rule.  When a user defined variable of integer type is expected,  
  2689. [INTVAR] is the rule. 
  2690.  
  2691. The table below lists the rules (allowable values) for each parameter. 
  2692.  
  2693. Rule Name       Allowed Values 
  2694. ADDOPT          BEFORE AFTER 
  2695. ATTRIBUTE       RO  RW  A  SY  H  SH -A -SY -H -SH 
  2696. CONDOPER        <  >  =  !=  >=  <= 
  2697. DEFINEOPT       STRING  INTEGER 
  2698. DELETEOPT       ALL 
  2699. FILENAME        [STRVAR] "filename.ext" (wild cards not allowed for file name) 
  2700. FILEWILD        [STRVAR] "filename.ext" "*.*" (wild cards are allowed but  
  2701.         not required for a file name) 
  2702. INTVALUE        [INTVAR] [RETVAL]  # (where # is a valid integer) 
  2703. INTVAR          [INTVAR] 
  2704. PATH            [STRVAR] "path" [TARGET] [BOOT_ROOT] [WINDIR] [WINSYSDIR]  
  2705.         [NETCFG] [HDRIVE] [NDRIVE] [SERVERNAME] [LOGINNAME]  
  2706.         [FUSIONNAME] [LOGSCRNAME] 
  2707. PATHFILE        [STRVAR] "{path\}filename.ext" 
  2708. SHELLOPT        KEEPPATH 
  2709. STRVAR          [STRVAR] 
  2710. STRVALUE        [STRVAR] "text" [TARGET] [BOOT_ROOT] [WINDIR] [WINSYSDIR]  
  2711.         [NETCFG] [HDRIVE] [NDRIVE] [SERVERNAME] [LOGINNAME]  
  2712.         [FUSIONNAME] [LOGSCRNAME] 
  2713. TEXT            "text" 
  2714. UPGOPT          5.00 6.00 
  2715.       
  2716.  
  2717. 22.8.1 System Variables 
  2718.  
  2719. The rules listed in the above table are defined as follows: 
  2720.  
  2721. 22.8.2 String Type Rules: 
  2722.  
  2723. [BOOT_ROOT] - the root of the boot drive of the workstation on which the  
  2724. script is executed 
  2725.  
  2726. [HDRIVE] - drive letter of the first available hard drive  (may be boot or  
  2727. network drive) 
  2728.  
  2729. [FUSIONNAME] - primary user name from BrightWorks databases (generally same  
  2730. as LOGINNAME) 
  2731.  
  2732. [LOCATION] - location field from BrightWorks inventory databases 
  2733.  
  2734. [LOGINNAME] - login name of user 
  2735.  
  2736. [LOGSCRNAME] - full path and file name of login script for user running  
  2737. update. 
  2738.  
  2739. [NDRIVE] - drive letter of the first available network drive 
  2740.  
  2741. [NETCFG] - path to NET.CFG used at NetWare shell load (must be in path) 
  2742.  
  2743. [SERVERNAME] - name of server on which the update program is running 
  2744.  
  2745. [TARGET] - installation path as defined by the administrator (or changed  
  2746. by user, if able to) 
  2747.  
  2748. [WINDIR] - the user's Windows directory (directory in which the login  
  2749. module finds WIN.INI - this directory must be in the path) 
  2750.  
  2751. [WINSYSDIR] - the user's Windows\System directory (directory in which the  
  2752. login module finds USER.EXE - this directory may be in the SYSTEM  
  2753. directory below WINDIR, or in the path) 
  2754.  
  2755. 22.8.3 Integer Type Rules: 
  2756.  
  2757. [DISKSPACE] - available disk space in drive specified in [TARGETDIR].   
  2758. The number is in bytes. 
  2759.  
  2760. [RETVAL] - return code of last command completed 
  2761.  
  2762.  
  2763. 22.9 DOS Error Codes 
  2764.  
  2765. The following lists the DOS error codes that may be returned from the  
  2766. script functions.  For each error, the number, message, reason, action,  
  2767. and functions that return the error are described. 
  2768.  
  2769. o Message # 2 - "File not found." Reason: file specified in the script  
  2770. does not exist. Check the filename and path. Functions returning error: 
  2771. GETINISTR() - The file from which you requested a string does not exist.  
  2772. GETINIINT() - The file from which you requested an integer does not exist. 
  2773.  
  2774. o  Message # 3 -  "Path not found." Reason: a directory path specified  
  2775. in the script does not exist.  Check the path and directory name.  Functions 
  2776. returning error: DELETEDIR() - The directory that you requested to delete  
  2777. does not exist, or it does not exist in the location you specified. 
  2778.  
  2779. o  Message # 4 - "Too many open files (no handles left)." Reason:  
  2780. insufficient file handles are specified in CONFIG.SYS.  Increase the  
  2781. number of file handles in CONFIG.SYS.  Functions returning error: COPY()  
  2782. All Easy System File and Windows System File functions. 
  2783.  
  2784. o  Message # 5 - "Access denied." Reasons: specified drive or file cannot  
  2785. be accessed. Insufficient user rights, read only files, disk full. Verify  
  2786. the user rights, file attributes and available disk space. Functions  
  2787. returning error: DELETEFILE(), ADDPATH(), ADDLINE(), REPLACELINE(),  
  2788. REPLACEKEY(), ADDDEVICE(), CFGSETVALUE(), CFGSETSTRING(), REPLACELINEADD(),  
  2789. WRITEINISTR(), WRITEINIINT() - Is the file flagged read only?  Is the  
  2790. disk full?  Does the end user have insufficient rights in the specified  
  2791. directory?  DELETEDIR() - Subdirectories and/or files exist, and the  
  2792. "ALL" option was not used in the script.  ADDGROUP(), ADDITEM(),  
  2793. SCHEDULEWIN() - Is WIN.INI flagged read only?  
  2794.  
  2795. o  Message # 8 - "Insufficient memory" Reason: Not enough memory to  
  2796. complete the specified action. Unload unnecessary TSRs, check workstation  
  2797. memory management.  Functions returning this error: All DOS, Easy System  
  2798. File and Windows System File functions. 
  2799.  
  2800. o  Message # 15 - "Invalid drive" Reason: The drive specified does not  
  2801. exist. Check the drives specified in the script. Functions returning this       
  2802. error: All DOS, Easy System File and Windows System File functions. 
  2803.  
  2804. o  Message # 16 - "Attempt to remove current directory" Reason: The  
  2805. directory you attempted to delete is active on a drive.  Functions returning               
  2806. this error: DELETEDIR() - Is the directory specified active on the drive?   
  2807. If it is a network drive, are other users active on the drive?  
  2808.  
  2809. o  Message # 17 - "Not same device" Reason: An action was specified on  
  2810. two separate drives.  Ensure that you are not attempting to "cross drives"  
  2811. on an action that does not permit this (e.g., RENAME)  Functions returning   
  2812. this error: RENAME() - Are the source and target locations different? 
  2813.  
  2814. o  Message # 18 - "No more files"  Reason: The specified file could not be  
  2815. found.  Check the path and filename. Check end user rights in the directory  
  2816. specified.  Functions returning this error: DELFILE(), ATTRIB(), RENAME(),  
  2817. SETSYSFILE(),  COPY() - Does the specified file exist in the location  
  2818. specified?  Does the end user have sufficient rights to see the file? 
  2819.  
  2820. o  Message # 19 - "Disk is write protected"  Reason:  The write protect  
  2821. tab is enabled on the disk specified in the operation.  Remove the write  
  2822. protect tab.  Functions returning this error:  All DOS, Easy System File  
  2823. and Windows System File functions. 
  2824.  
  2825. o  Message # 21 - "Drive not ready"  Reason: There is no disk in the drive  
  2826. specified in the operation. Insert the diskette.  Functions returning this   
  2827. error: All DOS, Easy System File and Windows System File functions. 
  2828.  
  2829. o  Message # 22 - "Invalid disk command"  Reason: Media access error.      
  2830. Check the diskette or drive. Functions returning this error: Bad or  
  2831. damaged diskette. 
  2832.  
  2833. o  Message # 23  - "CRC error"  Reason: Media access error.  Check the  
  2834. diskette or drive.  Functions returning this error: Bad or damaged diskette. 
  2835.  
  2836. o  Message # 24 - "Invalid length"  Reason: Media access error.  Check the  
  2837. diskette or drive. Functions returning this error: Bad or damaged diskette. 
  2838.  
  2839. o  Message # 25 - "Seek error"  Reason: Media access error.  Check the  
  2840. diskette or drive.  Functions returning this error: Bad or damaged diskette. 
  2841.  
  2842. o  Message # 27 - "Sector not found"  Reason: Media access error.  Check  
  2843. the diskette or drive.  Functions returning this error: Bad or damaged  
  2844. diskette. 
  2845.  
  2846. o  Message # 29 - "Write fault"  Reason: Media access error.  Check the  
  2847. diskette or drive.  Functions returning this error: Bad or damaged diskette. 
  2848.  
  2849. o  Message # 30 - "Read fault"  Reason: Media access error. Check the  
  2850. diskette or drive.  Functions returning this error: Bad or damaged diskette. 
  2851.  
  2852. o  Message # 31 - "General failure"  Reason:  Media access error.  Check  
  2853. the diskette or drive.  Functions returning this error:  Diskette may  
  2854. not be formatted. 
  2855.  
  2856.  
  2857.  
  2858. 23.0 Scopes 
  2859.  
  2860. Chapter 22 discussed the software distribution script language  This  
  2861. chapter discusses the creation and management of scopes--the group of  
  2862. workstations defined to receive a distributed package. 
  2863.  
  2864. NOTE:  This chapter pertains to BrightWorks. 
  2865.  
  2866.  
  2867. 23.1 Introduction 
  2868.  
  2869. A scope is a group of workstations defined to receive a distributed  
  2870. package.  Defining a scope is as easy as assigning a name to the new  
  2871. scope.  After the scope is created, any number of workstations can be  
  2872. included in the scope definition. 
  2873.  
  2874. 23.1.1 Scope Features 
  2875.  
  2876. By taking advantage of the database of inventory information maintained  
  2877. by BrightWorks, users can create scopes by selecting from nodes that match  
  2878. specific filtering criteria.   
  2879.  
  2880. The filtering criteria is saved as a "query" and then applied against the  
  2881. database to narrow down the list of applicable workstations.  Scope  
  2882. membership is subsequently assigned using the list of nodes that match the  
  2883. user-specified filtering criteria.  Items such as CPU speed, workstation  
  2884. memory and installed software can be used to accommodate a scope's intent.   
  2885. For example, a scope named CPU386 might consist of the network's 386  
  2886. workstations; a scope named 386>16MHz might consist of the network's 386  
  2887. workstations that also have a CPU clock frequency greater than 16 MHz. 
  2888.  
  2889. Scopes and queries can be stored, used and reused as resources within  
  2890. BrightWorks.  A user can create a new scope, as well as edit, copy,  
  2891. rename and delete a scope.  The steps for managing both scopes and queries  
  2892. are provided in this chapter. 
  2893.  
  2894. 23.1.2 Access to Scope Functions 
  2895.  
  2896. Scope functions are accessed by choosing the Scopes command from the  
  2897. Tools menu.  The Scopes dialog box displays listing all available scopes. 
  2898.  
  2899. 23.1.3 What's in this Chapter 
  2900.  
  2901. The following chart describes the sections in this chapter: 
  2902.  
  2903. SECTION                 DESCRIPTION 
  2904. Creating Scopes         Describes procedures for defining new scopes. 
  2905.  
  2906. Scope Queries           Describes procedures for applying queries to  
  2907.             scopes, removing queries from scopes, creating  
  2908.             new queries, editing queries and deleting queries. 
  2909.  
  2910. Managing Scopes         Describes procedures for editing, renaming,  
  2911.             copying and deleting scopes. 
  2912.  
  2913.  
  2914. 23.2 Creating Scopes 
  2915.  
  2916. Use the following procedure to create a new scope. 
  2917.  
  2918. NOTE:  At least one audit must have been run in order to create a scope. 
  2919.  
  2920. 1.  Choose the Scopes command from the Tools menu. 
  2921.  
  2922.     The Scopes dialog box displays listing the names of all defined scopes.   
  2923.  
  2924. 2.  Choose the New button. 
  2925.  
  2926.     The New Scope dialog box displays prompting you to enter a name for  
  2927.     the new scope.   
  2928.  
  2929. 3.  Enter the new scope name, and choose the OK button. 
  2930.  
  2931.     A scope name can be up to 80 characters, and all typed characters are  
  2932.     valid.  For example, enter the new scope name "386/16MHZ" which will  
  2933.     include the network's 386/16MHz nodes. 
  2934.  
  2935.     Upon choosing the OK button, the Edit Scope dialog box displays  
  2936.     prompting you to define the new scope. 
  2937.  
  2938.     The Edit Scope dialog box consists of two lists: 
  2939.  
  2940.     o  Nodes in SITE - the list on the left side of the dialog box  
  2941.     consists of all node names that apply to the local site.  The  
  2942.     site name is indicated by the SITE text in the list title. The  
  2943.     nodes in this list are not included in the selected scope  
  2944.     (i.e., the list to the right).   
  2945.  
  2946.     o  Nodes included in Scope - the list on the right side of the  
  2947.     dialog box consists of the nodes that are in the selected scope.   
  2948.  
  2949. NOTE:  The Query Options section of the Edit Scope dialog box is used to  
  2950. perform a query to filter the node names in the Nodes in SITE list.   
  2951. For detailed instructions on performing queries, refer to the next  
  2952. section of this chapter entitled "Scope Queries." 
  2953.  
  2954. 4.  Define the nodes to be included in the scope. 
  2955.  
  2956.     Use the push buttons in the center of the Edit Scope dialog box to  
  2957.     define the scope members.  To define scope membership, select a node  
  2958.     name from either list and choose the appropriate button: 
  2959.  
  2960.     o  Include >> - choose this button to include the selected node  
  2961.     in the scope.  The node name moves from the left list to the right  
  2962.     list. 
  2963.  
  2964.     o  Include All - choose this button to include all listed nodes in  
  2965.     the scope.  All node names move from the left list to the right list. 
  2966.  
  2967.     o  << Remove - choose this button to remove the selected node from  
  2968.     the scope.  The node name moves from the right list to the left list. 
  2969.  
  2970.     o  Remove All - choose this button to remove all nodes from the  
  2971.     scope.  All node names move from the right list to the left list. 
  2972.  
  2973. NOTE:  Because user names can be edited via the View Inventory Details  
  2974. dialog box, the node names in the Nodes in SITE list do not necessarily  
  2975. correspond to NetWare user names.  As a result, there may be duplicate  
  2976. names in this list.  Viewing the inventory details of nodes with the same  
  2977. name enables you to differentiate between the nodes.  Choose the View  
  2978. button or double click on a name in either list to invoke the View  
  2979. Inventory Details dialog box for the selected node.  
  2980.  
  2981. 5.  When the scope members are defined, choose the Save button. 
  2982.  
  2983.  
  2984. 23.3 Scope Queries 
  2985.  
  2986. When no filtering criteria is applied to a scope, all nodes in the  
  2987. local BrightWorks site are listed in the Nodes in SITE list of the Edit  
  2988. Scope dialog box.  This condition is indicated by the <None> entry in  
  2989. the Last Query field.   
  2990.  
  2991. Searching through a large list of nodes might make the process of  
  2992. defining scope membership cumbersome.  Applying a query to a scope refines  
  2993. the number of nodes in the Nodes in SITE list so that scope membership  
  2994. can be made from a "qualified" list of nodes. 
  2995.  
  2996. NOTE:  Only one query can be applied to a scope at any time.  Each query  
  2997. can consist of more than one filtering criteria.  An applied query  
  2998. always filters from the entire list of nodes in the local BrightWorks site. 
  2999.  
  3000. Queries can be saved and applied to any number of scopes.  The same queries  
  3001. can be applied to BrightWorks inventory and distribution reports, as is  
  3002. discussed in Chapter 18 of this manual. 
  3003.  
  3004. This section lists the procedures for: 
  3005. o  Creating a new query 
  3006. o  Editing a query 
  3007. o  Deleting a query 
  3008. o  Applying a query to the scope  
  3009. o  Removing a query from the scope  
  3010.  
  3011. 23.3.1 Creating a New Query 
  3012.  
  3013. Use the following procedure to create a new query.  The procedure assumes  
  3014. that you have already chosen the Select button in the Edit Scope dialog  
  3015. box to display the Select Query dialog box. 
  3016.  
  3017. NOTE:  All queries are also available when generating BrightWorks  
  3018. inventory and distribution reports, as discussed in Part Three,  
  3019. Chapter 18 of this manual.  
  3020.  
  3021. 1.  Choose the Add button in the Select Query dialog box. 
  3022.  
  3023.     The Add Query dialog box displays.  Press the <TAB> key to move  
  3024.     from field to field within this dialog box. 
  3025.  
  3026. 2.  Enter a Query Name and define a filter entry. 
  3027.  
  3028.     The purpose of each filter entry is to narrow down the list of nodes  
  3029.     that apply to the specified criteria.  If more than one filter entry  
  3030.     is defined, the entries are "linked" using either the AND or OR  
  3031.     relationship.   
  3032.  
  3033.     For example, assume the following two filter entries: 
  3034.  
  3035.     Central Processing Unit = Intel_80386 
  3036.     CPU Clock Frequency > 66.00 Mhz 
  3037.  
  3038.     If the entries are linked with the OR relationship, only the nodes  
  3039.     that satisfy either criteria (i.e., all Intel 80386 machines and  
  3040.     all machines that have a clock speed greater than 66 Mhz) are  
  3041.     included in the database sort. 
  3042.  
  3043.     If the entries are linked with the OR relationship, the nodes that  
  3044.     satisfy either criteria (i.e., all 286 machines and all machines  
  3045.     that have a 720k floppy drive) are included in the database sort.  
  3046.  
  3047.     For each filter entry, specify the following: 
  3048.  
  3049.     o  Query Name - Enter a query name up to 80 characters in length. 
  3050.  
  3051.     o  Component - Choose a component from the BrightWorks inventory  
  3052.     database to use as the filter basis.  Select a component from the  
  3053.     drop-down list associated with this field (e.g., Brand, Computer  
  3054.     Model, CPU Clock Frequency). 
  3055.  
  3056.     o  Condition - Choose a conditional operator from the drop-down  
  3057.     list associated with this field (e.g., equal to, less than,  
  3058.     greater than, not equal to).  'Equal to' is the default condition. 
  3059.  
  3060.     o  Description - If desired, choose a description of the component.   
  3061.     The items which automatically display in this list depend on the  
  3062.     selected component.  For example, "Intel_80386" might display if  
  3063.     Central Processing Unit is entered in the Component field;  
  3064.     "16.00 Mhz" might display if CPU Clock Frequency is entered in the  
  3065.     Component field.  See Note (a) below. 
  3066.  
  3067.     o  Query Link - Specify the relationship between the filter  
  3068.     entries (e.g., Central Processing Unit = 80386 OR Central  
  3069.     Processing Unit = 80486).  The link options are AND and OR.   
  3070.     See Note (b) below. 
  3071.  
  3072. NOTES:  a - To create a query which tests for the presence of a  
  3073. component, leave the Description field blank.  For example, to include  
  3074. all nodes with a hard disk, construct a query with the following entries: 
  3075.  
  3076.     Component =  
  3077.     Hard Disk #1 < > 
  3078.  
  3079. In this case, the Component description is left blank, and the query  
  3080. results in including all nodes which have a hard disk (i.e., Hard Disk  
  3081. #1 does not equal blank). 
  3082. b - All filter entries in a query must have the same Query Link type  
  3083. (e.g., all entries will be linked by AND or all entries will be linked by OR). 
  3084.  
  3085. 3.  Choose the Insert button to accept the filter entry definition. 
  3086.  
  3087.     The entry is added to the Current Query List in the Edit Query dialog box. 
  3088.  
  3089. 4.  If required, insert additional filter entries.  
  3090.  
  3091.     Repeat steps #2 and #3 above. 
  3092.  
  3093. NOTE:  To add a filter entry between existing entries, first highlight  
  3094. the filter entry line in the Current Query list where you want the new  
  3095. entry to be placed.  The new defined entry is placed in the highlighted  
  3096. position. 
  3097.  
  3098. 5.  When all filter entries are defined, choose the Save button. 
  3099.  
  3100.     The query is saved and added to the Available Queries list in the  
  3101.     Select Query dialog box.  The new query can now be applied to a scope. 
  3102.  
  3103. 23.3.2 Editing a Query 
  3104.  
  3105. Use the following procedure to edit the definition of an existing query.   
  3106. The procedure assumes that you have already chosen the Select button in the  
  3107. Edit Scope dialog box to display the Select Query dialog box. 
  3108.  
  3109. 1.  Select a query from the Select Query dialog box, and choose the Edit  
  3110.     button. 
  3111.  
  3112.     The Edit Query dialog box displays showing the defined filter entries  
  3113.     for the query. 
  3114.  
  3115. 2.  Modify the filter information, and choose the Save button. 
  3116.  
  3117.     To delete a filter entry, highlight the entry in the Current Query  
  3118.     List and choose the Delete button. 
  3119.  
  3120.     To add a filter entry, specify the Component, Condition and Description,  
  3121.     and choose the Insert button.  (For detailed instructions on adding  
  3122.     filter entries, refer to the procedure above entitled "Creating a  
  3123.     New Query.") 
  3124.  
  3125. NOTE:  New filter entries are appended to the end of the Current Query  
  3126. List unless a filter entry is selected.  If an existing filter entry is  
  3127. selected, then the new filter entry gets inserted above it when you  
  3128. choose the Insert button. 
  3129.  
  3130. 23.3.3 Deleting a Query 
  3131.  
  3132. Use the following procedure to delete an existing query.  The procedure  
  3133. assumes that you have already chosen the Select button in the Edit Scope  
  3134. dialog box to display the Select Query dialog box. 
  3135.  
  3136. 1.  Select the query to be deleted from the Select Query dialog box, and  
  3137.     choose the Delete button. 
  3138.  
  3139.     A prompt displays asking you to confirm the deletion.   
  3140.  
  3141. 2.  Choose the Yes button to delete the query. 
  3142.  
  3143.     If deleted, the query name is removed from the Available Queries list.   
  3144.  
  3145. NOTE:  Queries that are currently applied to a scope and/or BrightWorks  
  3146. inventory and distribution report can be deleted. 
  3147.  
  3148. 23.3.4 Applying a Query to the Scope  
  3149.  
  3150. Use the following procedure to apply an existing query to a scope.  The  
  3151. procedure assumes that you have already chosen the Edit button in the  
  3152. Scopes dialog box to display the Edit Scope dialog box. 
  3153.  
  3154. 1.  Choose the Select button in the Query Options section of the Edit  
  3155.     Scope dialog box. 
  3156.  
  3157.     The Select Query dialog box displays listing all defined queries. 
  3158.  
  3159. 2.  Select the query name from the Available Queries list, and choose the  
  3160.     Apply button. 
  3161.  
  3162.     To select a query name, point to the query and click the left mouse  
  3163.     button.   
  3164.  
  3165. NOTE:  Applying a query to a scope causes a Printing Status dialog box to  
  3166. display while the database records are being sorted.  When this occurs,  
  3167. nodes are being selected (i.e., the information is not being sent to the  
  3168. printer). 
  3169.  
  3170.     The Select Query dialog box closes, and the selected query name is  
  3171.     placed into the Last Query field of the Edit Scope dialog box.  The  
  3172.     BrightWorks database records are sorted, and only the records that  
  3173.     match the query's specified filter criteria will display in the Nodes  
  3174.     in SITE list.  Now you can assign scope members using a "qualified"  
  3175.     list of nodes. 
  3176.  
  3177. NOTE:  If you already selected nodes to be included in the scope  
  3178. (i.e., the nodes listed in the Nodes Included in Scope list), the nodes  
  3179. continue to be "included" even if they do not match the filter criteria.   
  3180.  
  3181. 23.3.5 Removing a Query from the Scope 
  3182.  
  3183. Use the following procedure to remove a scope query.  
  3184.  
  3185. 1.  Choose the Select button in the Query Options section of the Edit  
  3186.     Scope dialog box. 
  3187.  
  3188.     The Select Query dialog box displays. 
  3189.  
  3190. 2.  Select the <None> query name, and choose the Apply button. 
  3191.  
  3192.     The Select Query dialog box closes.  All nodes in the local BrightWorks  
  3193.     site are listed in the Nodes in SITE list of the Edit Scope dialog box. 
  3194.  
  3195. 23.3.6 Creating a Complex Query 
  3196.  
  3197. A query can consist of any number of filter entries that are defined to  
  3198. produce a desired result.  The relationship between the filter entries is  
  3199. referred to as the "link." 
  3200.  
  3201. Assume that you are responsible for upgrading the workstations of all  
  3202. network users in the Sales Department who are currently using Intel 286  
  3203. machines with a CPU speed less than 16 MHz and which have a 1.44 megabyte  
  3204. floppy disk designated as drive A:.   
  3205.  
  3206. Use the following procedure to create a query that defines the scope of  
  3207. users in the above example. 
  3208.  
  3209. 1.  In the Add Query dialog box, enter a Query Name.  
  3210.  
  3211.     Enter a name that uniquely identifies this query  
  3212.     (e.g., "Sales 286/16Mhz"). 
  3213.  
  3214. 2.  Define the first filter entry, and choose the Insert button. 
  3215.  
  3216.     Enter the following for each field: 
  3217.  
  3218.     Component: Department 
  3219.     Condition: = 
  3220.     Description: Sales 
  3221.     Query Link: AND 
  3222.  
  3223. 3.  Define the second filter entry, and choose the Insert button. 
  3224.  
  3225.     Enter the following for each field: 
  3226.  
  3227.     Component: Central Processing Unit 
  3228.     Condition: = 
  3229.     Description: Intel_80286 
  3230.     Query Link: AND 
  3231.  
  3232. 4.  Define the third filter entry, and choose the Insert button. 
  3233.  
  3234.     Enter the following for each field: 
  3235.  
  3236.     Component: CPU Clock Frequency 
  3237.     Condition: < 
  3238.     Description: 16MHz 
  3239.     Query Link: AND 
  3240.  
  3241. 5.  Define the fourth filter entry, and choose the Insert button. 
  3242.  
  3243.     Enter the following for each field: 
  3244.  
  3245.     Component: Floppy Disk #1 
  3246.     Condition: = 
  3247.     Description: A: 1.44 M 
  3248.     Query Link: AND 
  3249.  
  3250. 6.  Choose the Save button to save the query. 
  3251.  
  3252.     The filter entries in the Current Query list in the Edit Query  
  3253.     dialog box should be identical to the following: 
  3254.  
  3255.     Department = Sales 
  3256.     Central Processing Unit = Intel_80286    AND 
  3257.     CPU Clock Frequency < 16MHz      AND 
  3258.     Floppy Disk #1 = A: 1.44 M       AND 
  3259.  
  3260.  
  3261.  
  3262. 23.4 Managing Scopes 
  3263.  
  3264. 23.4.1 Editing Scopes 
  3265.  
  3266. Editing a scope may become necessary under two circumstances: 
  3267.  
  3268. o  Existing scopes might need to be edited in order to add or delete  
  3269. members according to a change in a scope's intent. 
  3270.  
  3271. o  Scopes that are attached to packages might need to be edited when  
  3272. re-sending packages. 
  3273.  
  3274. Scope members are the nodes that are defined as a group to receive a  
  3275. distributed package.   
  3276.  
  3277. NOTE:  An existing scope can be edited even if the scope is part of a  
  3278. scheduled package.  This is useful if you need to re-send a package to  
  3279. a node(s).  If new nodes are added to a scope that is included in an  
  3280. active package, then the package will automatically get distributed to  
  3281. the new nodes. 
  3282.  
  3283. Use the following procedure to edit a scope.  The procedure assumes that  
  3284. you have already chosen the Scopes command from the Tools menu to  
  3285. display the Scopes dialog box. 
  3286.  
  3287. 1.  Select the scope from the list of Scopes, and choose the Edit button. 
  3288.  
  3289.     A scope can also be selected for editing by double clicking on the  
  3290.     scope name in the Scopes dialog box.  The Edit Scope dialog box displays. 
  3291.  
  3292.     The Edit Scope dialog box consists of two lists: 
  3293.  
  3294.     o  Nodes in SITE - the list on the left side of the dialog box  
  3295.     consists of all node names that apply to the local site.  The  
  3296.     site name is indicated by the SITE text in the list title.  The  
  3297.     nodes in this list are not included in the selected scope  
  3298.     (i.e., the list to the right).   
  3299.  
  3300.     o  Nodes included in Scope - the list on the right side of the  
  3301.     dialog box consists of the nodes that are in the selected scope.   
  3302.  
  3303. NOTE:  The Query Options section of the Edit Scope dialog box is used  
  3304. to perform a query to filter the node names in the Nodes in SITE list.   
  3305. for detailed instructions on performing queries, refer to section 23.3 
  3306. entitled "Scope Queries." 
  3307.  
  3308. 2.  Define the nodes to be included in the scope. 
  3309.  
  3310.     Use the push buttons in the center of the Edit Scope dialog box to  
  3311.     define the scope members.  To define scope membership, select a node  
  3312.     name from either list and choose the appropriate button: 
  3313.  
  3314.     o  Include >> - choose this button to include the selected node  
  3315.     in the scope.  The node name moves from the left list to the right  
  3316.     list. 
  3317.  
  3318.     o  Include All - choose this button to include all listed nodes  
  3319.     in the scope.  All node names move from the left list to the right  
  3320.     list. 
  3321.  
  3322.     o  << Remove - choose this button to remove the selected node  
  3323.     from the scope.  The node name moves from the right list to the  
  3324.     left list. 
  3325.  
  3326.     o  Remove All - choose this button to remove all nodes from the  
  3327.     scope.  All node names move from the right list to the left list. 
  3328.  
  3329. NOTE:  Because user names can be edited via the View Inventory Details  
  3330. dialog box, the node names in the Nodes in SITE list do not necessarily  
  3331. correspond to NetWare user names.  As a result, there may be duplicate  
  3332. names in this list.  Viewing the inventory details of nodes with the same  
  3333. name enables you to differentiate between the nodes.  Choose the View  
  3334. button or double click on a name in either list to invoke the View Inventory  
  3335. Details dialog box for the selected node.  
  3336.  
  3337. 3.  When the scope members are defined, choose the Save button. 
  3338.  
  3339. 23.4.1 Renaming Scopes 
  3340.  
  3341. Use the following procedure to rename a scope.  The procedure assumes  
  3342. that you have already chosen the Scopes command from the Tools menu to  
  3343. display the Scopes dialog box. 
  3344.  
  3345. NOTE:  A scope can be renamed even if it is part of an actively scheduled  
  3346. package. 
  3347.  
  3348. 1.  To rename a scope, select the scope from the list of Scopes, and  
  3349.     choose the Rename button. 
  3350.  
  3351.     The Rename Scope dialog box displays prompting you to enter a new  
  3352.     scope name. 
  3353.  
  3354. 2.  Enter the new scope name, and choose the OK button. 
  3355.  
  3356.     The new scope name displays in the Scopes dialog box, and the old  
  3357.     name is removed.  All attributes of the old scope are preserved in the  
  3358.     renamed scope (i.e., the scope members do not change). 
  3359.  
  3360. 23.4.2 Copying Scopes 
  3361.  
  3362. Use the following procedure to copy a scope.  The procedure assumes  
  3363. that you have already chosen the Scopes command from the Tools menu to  
  3364. display the Scopes dialog box. 
  3365.  
  3366. NOTE:  A scope can be copied even if the original scope is part of an  
  3367. actively scheduled package. 
  3368.  
  3369. 1.  To copy a scope, select the scope from the list of Scopes, and  
  3370.     choose the Copy button. 
  3371.  
  3372.     The Copy Scope dialog box displays prompting you to enter a name for  
  3373.     the new scope. 
  3374.  
  3375. 2.  Enter the new scope name, and choose the OK button. 
  3376.  
  3377.     The new scope name is added to the Scopes dialog box.  The new scope  
  3378.     members are identical to the original scope members. 
  3379.  
  3380.  
  3381. 23.4.3 Deleting Scopes 
  3382.  
  3383. Use the following procedure to delete a scope.  The procedure assumes  
  3384. that you have already chosen the Scopes command from the Tools menu to  
  3385. display the Scopes dialog box. 
  3386.  
  3387. NOTE:  A scope that is part of a scheduled package cannot be deleted. 
  3388.  
  3389. 1.  To delete a scope, select the scope from the list of Scopes, and  
  3390.     choose the Delete button. 
  3391.  
  3392.     A prompt displays asking you to confirm the deletion. 
  3393.  
  3394. 2.  Choose the Yes button to delete the scope. 
  3395.  
  3396.     If deleted, the scope name is removed from the Scopes dialog box.   
  3397.  
  3398.  
  3399.  
  3400. 24.0 Packages 
  3401.  
  3402. Chapter 23 discussed the creation and management of scopes.  This chapter  
  3403. discusses the creation and management of packages--the method by which  
  3404. software is distributed across your network. 
  3405.  
  3406. NOTE:  This chapter pertains to BrightWorks. 
  3407.  
  3408.  
  3409. 24.1 Introduction 
  3410.  
  3411. Creating and activating a package is the method by which software is  
  3412. distributed across your local area network.  When a package is created,  
  3413. it is assigned a scope and a "Start Date."  Upon reaching the start date  
  3414. and running the SDUPDATE.EXE program at a workstation in the scope, an  
  3415. active package automatically gets sent to the workstation. 
  3416.  
  3417. A package also consists of a fileset and/or a script to be distributed to  
  3418. the group of remote workstations.  For example, a package named  
  3419. UPGRADE_DOS might include a scope of users running DOS 3.3.  The package  
  3420. might also include a script which installs a fileset consisting of the  
  3421. DOS 6.0 files. 
  3422.  
  3423. The software distribution update program (SDUPDATE.EXE) is integrated  
  3424. with the packaging functionality.  The update program is responsible for  
  3425. determining the conditions for accepting or rejecting a package.  The  
  3426. program is also responsible for reporting on package status as input to the  
  3427. Packages window and the Software Distribution Log. 
  3428.  
  3429. 24.1.1 Package Features 
  3430.  
  3431. In addition to the contents and scope, every package is assigned a schedule  
  3432. and a method for delivery.  A package's schedule is the date on which the  
  3433. package is to be distributed.  The method of delivery specifies instructions  
  3434. for the receiving workstation.  There are several options available to  
  3435. the workstation user when a package is received.  For example, package  
  3436. ABC might be configured to prompt the user five times to accept the  
  3437. package before proceeding with the installation of its fileset.   
  3438.  
  3439. A user can create a new package, as well as edit, rename and delete a  
  3440. package.  The steps for each procedure are discussed in this chapter.  
  3441.  
  3442. 24.1.2 Access to Package Functions 
  3443.  
  3444. Most package functions are accessed by either: 
  3445.  
  3446. o  choosing the Packages command from the Tools menu, or 
  3447. o  choosing the Distribute tool bar button  
  3448.  
  3449. Both of the above actions cause the Packages window to display.   
  3450.  
  3451. Package management is performed by either choosing the buttons in the  
  3452. Packages window or by choosing the corresponding commands from the File  
  3453. menu.  For example, when the Packages window is active, a new package  
  3454. can be created either by choosing the New button in the Packages window  
  3455. or by choosing the New Package command from the File menu.   
  3456.  
  3457. The information in the Packages window is updated according to an  
  3458. interval called the "package timer."  Package timer functions are accessed  
  3459. by choosing the Distribution command from the Administration menu.  
  3460.  
  3461. 24.1.3 What's in this Chapter 
  3462.  
  3463. The following chart describes the sections in this chapter: 
  3464.  
  3465. SECTION                         DESCRIPTION 
  3466. Creating and Editing Packages   Describes procedures for defining new  
  3467.                 packages and for editing existing packages. 
  3468.  
  3469. Managing Packages               Describes procedures for renaming,  
  3470.                 activating/deactivating, and deleting  
  3471.                 packages. 
  3472.  
  3473. The Package Timer               Describes procedures for setting the  
  3474.                 package timer interval. 
  3475.  
  3476.  
  3477.  
  3478. 24.2 Creating and Editing Packages 
  3479.  
  3480. Use the following procedure to create a new package. 
  3481.  
  3482. 1.  Choose the Packages command from the Tools menu, or choose the  
  3483.     Distribute tool bar button. 
  3484.  
  3485.     The Packages window displays.  This window lists the names of all  
  3486.     defined packages.  For each package, the following is indicated:  
  3487.  
  3488.     o  Start Date - the date the package will be distributed 
  3489.     o  Status - the package's status (Active or Inactive) 
  3490.     o  Total - the total number of workstation in the package's scope 
  3491.     o  Done - the number of successful updates so far 
  3492.     o  Errors - the total number of failed attempts at performing  
  3493.     an update 
  3494.  
  3495. NOTE:  Packages that have the same Start Date are distributed in the  
  3496. order in which they appear in the Packages window.  To change a  
  3497. package's priority, refer to section 24.3.1 entitled "Prioritizing  
  3498. Packages."  
  3499.  
  3500. 2.  Choose the New button in the Packages window. 
  3501.  
  3502.     The New Package dialog box displays prompting you to enter a name  
  3503.     for the new package. 
  3504.  
  3505. 3.  Enter the new package name, and choose the OK button. 
  3506.  
  3507.     The package name can be up to 80 characters, and all typed characters  
  3508.     are valid. 
  3509.  
  3510.     Upon choosing OK, a New Package dialog box displays.  The name of the  
  3511.     new package is indicated in the title bar of the dialog box. 
  3512.  
  3513. 4.  Select a fileset and/or a script to be included in the package. 
  3514.  
  3515.     Choose the down arrow button to the right of the Update Fileset  
  3516.     and/or Update Script fields to display the list of existing filesets  
  3517.     and scripts.  Select the desired items from the drop-down lists. 
  3518.  
  3519. NOTE:  A package must include either one fileset or one script, or both. 
  3520.  
  3521. 5.  Select the scope to receive the package. 
  3522.  
  3523.     Choose the down arrow button to the right of the Update Scope field  
  3524.     to display the list of existing scopes.  Select a scope from the  
  3525.     drop-down list. 
  3526.  
  3527. NOTE:  A scope must be assigned to the package. 
  3528.  
  3529. 6.  Assign the package's Start Date. 
  3530.  
  3531.     Enter the date on which the package is to be distributed.  The current  
  3532.     date appears as a default in this field.  Use the up/down arrow buttons  
  3533.     to the right of the Start Date field to scroll to the desired date,  
  3534.     or press the <F4> key to display a calendar from which a date can be  
  3535.     selected. 
  3536.  
  3537. 7.  Assign the Active or Inactive status to the package. 
  3538.  
  3539.     Check the "Update active when saved" option to automatically place  
  3540.     the package in an active state upon saving the package.  (An active  
  3541.     package will get distributed automatically on its assigned start date.) 
  3542.  
  3543.     If this field is not checked, an Inactive status will be assigned to  
  3544.     the package.  An inactive package will not get distributed  
  3545.     automatically on its assigned start date. 
  3546.  
  3547. 8.  Specify the package's update option. 
  3548.  
  3549.     The selected Update Option instructs the software distribution update  
  3550.     program how it should interact with the receiving workstation user at  
  3551.     login time. 
  3552.  
  3553.     The four Update Options are: 
  3554.  
  3555.     o  Force upgrade at next login - This option forces the package's  
  3556.     receipt on the user at the next login.  If an error occurs, the  
  3557.     distribution is halted so the administrator can address the  
  3558.     problem and reschedule the package. 
  3559.  
  3560.     o  User optional until [DATE] and then [ABANDON, FORCE] update -  
  3561.     This option allows the user to refuse the package until the  
  3562.     indicated DATE.  After the DATE, the package is either abandoned  
  3563.     or forced to be received by the user. 
  3564.  
  3565.     o  User optional, prompt user [# TIMES] and then [ABANDON, FORCE]  
  3566.     update - This option allows the user to refuse the package a  
  3567.     certain number of times (# TIMES).  After the threshold is reached,  
  3568.     the package is either abandoned or forced to be received by the user. 
  3569.  
  3570.     o  Run this package always - This option forces the package's  
  3571.     receipt on the user at each and every login.  This update option  
  3572.     is most useful in situations where system variables are being  
  3573.     modified directly by users. 
  3574.  
  3575. 9.  Specify the target path in which the fileset should be decompressed. 
  3576.  
  3577.     A default path must be assigned to the package.  The default path is  
  3578.     the target path in which the distributed software (i.e., fileset) is  
  3579.     to be installed or copied.   
  3580.  
  3581.     The default path can be: 
  3582.  
  3583.     o  entered as a hard-coded drive mapping and directory  
  3584.     combination (e.g., C:\BIN\DRIVERS). 
  3585.  
  3586.     o  entered as a hard-coded server, volume and directory  
  3587.     combination (e.g., SERVER/VOLUME:\DIR or VOLUME:\DIR).  If a  
  3588.     server is specified, then the user receiving the package must be  
  3589.     attached to the server. 
  3590.  
  3591.     o  reliant upon a system configuration found at the receiving  
  3592.     workstation.  Reliance is implemented by using one of the following  
  3593.     target default path options available from the drop down list  
  3594.     associated with this field: 
  3595.  
  3596.         - [BOOT_ROOT] - the root of the receiving machine's boot  
  3597.         disk 
  3598.         - [HDRIVE] - the receiving machine's first hard drive 
  3599.         - [NDRIVE] - the receiving machine's first network drive 
  3600.         - [NETCFG] - path to the receiving machine's network  
  3601.         configuration (which must be in the path) 
  3602.         - [WINDIR] - the receiving machine's Windows directory  
  3603.         (the directory in which the login module finds WIN.INI -  
  3604.         this directory must be in the path) 
  3605.         - [WINSYSDIR] - the receiving machine's Windows\System  
  3606.         directory (directory in which the login module finds  
  3607.         USER.EXE - this directory may be in the SYSTEM directory  
  3608.         below WINDIR, or in the path) 
  3609.  
  3610.     These variables can be used in combination with a hard-coded value  
  3611.     (e.g., [WINSYSDIR]\TEMP).  In this case, the backslash character (\)  
  3612.     is required and the variable name must be first.  If a specified  
  3613.     directory does not exist, it will be created. 
  3614.  
  3615.     If desired, check the "Allow user to override installation path" option  
  3616.     to allow the user at the receiving workstation to override the selected  
  3617.     path. 
  3618.  
  3619. 10. To define advanced package options, choose the Advanced button. 
  3620.  
  3621.     The Advanced Options dialog box displays.  The advanced package  
  3622.     options consist of the following categories: 
  3623.  
  3624.     o  Windows Error Options - options associated with how the software  
  3625.     distribution update program should react in the event that the Windows  
  3626.     directory is not discovered at a receiving workstation. 
  3627.  
  3628.     o  Fileset and Script Options - options which define the execution  
  3629.     precedence for the package's fileset and script  (e.g., which one  
  3630.     the software distribution update program should run first at the  
  3631.     receiving workstation).  
  3632.  
  3633.     o  Script Error Options - options associated with how the software  
  3634.     distribution update program should react in the event of script errors.    
  3635.     (The script function error codes are detailed in Chapter 22 of this  
  3636.     manual, "Software Distribution Script Language.") 
  3637.  
  3638. NOTE:  Several script functions may return a non-zero value that is not  
  3639. considered to be an error.  For example, the FINDFILE function returns  
  3640. a -1 if the file is not found; the STRCOMPARE function returns non-zero  
  3641. value if the two strings are not equal.  You might want to disable the  
  3642. Script Error Options when using functions that return non-zero values even  
  3643. when successful. 
  3644.  
  3645. 11. When all package attributes are defined, choose the Save button. 
  3646.  
  3647. 24.2.1 Editing Packages 
  3648.  
  3649. Editing a package may be necessary in order to modify package attributes. 
  3650.  
  3651. Use the following procedure to edit the attributes of a package.  The  
  3652. procedure assumes that you have already chosen the Packages command from  
  3653. the Tools menu to display the Packages window. 
  3654.  
  3655. 1.  To edit package attributes, select the package from the Packages  
  3656.     window, and choose the Edit button. 
  3657.  
  3658.     A package can also be selected for edit by double clicking on the  
  3659.     package name in the Packages window.  The Edit Package dialog box  
  3660.     displays showing the configuration of the selected package.  The  
  3661.     fields and options in this dialog box are identical to the New Package  
  3662.     dialog box. 
  3663.  
  3664.     The name of the package being edited displays in the title bar of  
  3665.     the Edit Package dialog box. 
  3666.  
  3667. 2.  Modify the package attributes. 
  3668.  
  3669.     Changes can be made to any field except the Update Scope, Update  
  3670.     Fileset and Update Script fields. 
  3671.  
  3672. NOTES: a - Although the package's scope, fileset and script cannot be  
  3673. changed, their definition can be changed.  For example, if Scope ABC  
  3674. is assigned to the package, you cannot assign Scope XYZ to the package  
  3675. but you can edit the members of scope ABC. 
  3676. b - If a package fails, it can be re-distributed to a user by first  
  3677. removing the user from the scope and saving the edited scope, and then  
  3678. adding the user back into the scope and again saving the edited scope.   
  3679. Be careful when doing this because editing a scope changes all instances  
  3680. of the scope (i.e., even those included in packages).  
  3681.  
  3682.     If the distribution of a package has already begun, the changes made  
  3683.     to the package take effect on the next node in the scope to receive  
  3684.     the package. 
  3685.  
  3686. 3.  Choose the Save button. 
  3687.  
  3688.     The Packages window re-displays.  
  3689.  
  3690. NOTE:  To display the Software Distribution Log History details  
  3691. associated with a package, highlight the package in the Packages window  
  3692. and choose the Details button.  The Log Details dialog box displays  
  3693. showing the details for the selected package.  This dialog box is discussed  
  3694. in Chapter 25. 
  3695.  
  3696.  
  3697. 24.3 Managing Packages 
  3698.  
  3699. 24.3.1 Prioritizing Packages 
  3700.  
  3701. The priority with which each package is run is determined by its position  
  3702. in the Packages window.  Packages that have the same Start Date are  
  3703. distributed in the order in which they are listed. 
  3704.  
  3705. To modify a package's run time, highlight the package in the Packages  
  3706. window, and choose either the Up or Down buttons.  The highlighted package  
  3707. will be moved in the selected direction. 
  3708.  
  3709. For example there are two packages scheduled to be distributed on  
  3710. 1/12/1994.  Because of their position in the list of packages, WIN_INI  
  3711. will be distributed before UPDATED SYSTEM FILES.  To change their  
  3712. distribution order, highlight the UPDATED SYSTEM FILES fileset and  
  3713. choose the up arrow button.  
  3714.  
  3715. Also note that the status of the TUTORIAL package is "Complete (A)."   
  3716. The (A) indicates that although the package has been distributed to all  
  3717. workstations in the scope, the package is still active.  Therefore, if  
  3718. the package's scope is edited to include additional nodes, the package will  
  3719. automatically get distributed to those new nodes. 
  3720.  
  3721. 24.3.2 Renaming Packages 
  3722.  
  3723. Changing the name of an existing package renames the package in the  
  3724. Packages window. 
  3725.  
  3726. Use the following procedure to rename a package.  The procedure assumes  
  3727. that you have already chosen the Packages command from the Tools menu  
  3728. to display the Packages window. 
  3729.  
  3730. NOTE:  Actively scheduled packages can be renamed. 
  3731.  
  3732. 1.  To rename a package, select the package from the Packages list, and  
  3733.     choose the Rename button. 
  3734.  
  3735.     The Rename Package dialog box displays prompting you to enter a new  
  3736.     package name. 
  3737.  
  3738. 2.  Enter the new package name, and choose the OK button. 
  3739.  
  3740.     The new package name displays in the Packages window, and the old  
  3741.     name is removed.  All attributes of the old package are preserved in  
  3742.     the renamed package (i.e., the package's scope, script and/or fileset  
  3743.     definitions do not change). 
  3744.  
  3745. 24.3.3 Activating/Deactivating Packages 
  3746.  
  3747. New packages are assigned the Active status if the Update Active when  
  3748. Saved option is selected.  An active package automatically gets distributed  
  3749. upon reaching its assigned Start Date.  An inactive package will not get  
  3750. distributed until it is re-activated. 
  3751.  
  3752. The status indication of a selected package in the Packages window  
  3753. toggles between Active/Inactive by choosing the Activate/Deactivate  
  3754. toggle button in the Packages window. 
  3755.  
  3756. The status of a completed package (i.e., a package that has been sent to  
  3757. all nodes in its scope) remains active.  Its status is indicated by  
  3758. "Complete (A)."  By highlighting the completed package and choosing the  
  3759. Deactivate toggle button, the status changes to "Complete (I)" which  
  3760. indicates an inactive status. 
  3761.  
  3762. 24.3.4 Deleting Packages 
  3763.  
  3764. Use the following procedure to delete a package.  The procedure assumes  
  3765. that you have already chosen the Packages command from the Tools menu to  
  3766. display the Packages window. 
  3767.  
  3768. NOTE:  Actively scheduled packages cannot be deleted.  To delete a package  
  3769. with an Active status, first make the package status Inactive by  
  3770. highlighting the package and choosing the Deactivate button.  Then  
  3771. perform the Delete action. 
  3772.  
  3773. 1.  To delete a package, select the package from the Packages window,  
  3774.     and choose the Delete button.  
  3775.  
  3776.     A prompt displays asking you to confirm the deletion. 
  3777.  
  3778. 2.  Choose the Yes button to delete the package. 
  3779.  
  3780.     If deleted, the package name is removed from the Packages window.   
  3781.  
  3782. NOTE:  Deleting a package does not delete the associated log entry in  
  3783. the Software Distribution Log History dialog box. 
  3784.  
  3785.  
  3786. 24.4 The Package Timer 
  3787.  
  3788. The Packages window displays the status of each scheduled package.   
  3789. Status information includes the number of workstations in the package's  
  3790. scope (Total), the current number of successful updates (Done) and the  
  3791. total number of failed attempts at performing an update (Errors).  The  
  3792. window contents are updated according to a defined package timer interval.   
  3793.  
  3794. Use the following procedure to set the package timer and define the  
  3795. interval at which the Packages window data is updated. 
  3796.  
  3797. 1.  Choose the Distribution command from the Administration menu.  From  
  3798.     the sub-menu that displays, choose the Set Package Timer command. 
  3799.  
  3800.     The Set Package Timer dialog box displays.  
  3801.  
  3802. 2.  Enter the time interval at which the Packages window should be  
  3803.     updated, and choose the OK button. 
  3804.  
  3805.     Enter the time in seconds.  (The default is 30 seconds.)  The  
  3806.     information in the Packages window will be updated at the defined  
  3807.     interval. 
  3808.  
  3809. NOTE:  The status of the Packages window can also be updated on demand  
  3810. by choosing the Distribution command from the Administration menu.   
  3811. From the sub-menu that displays, choose the Query Now command. 
  3812.  
  3813.  
  3814.  
  3815. 25.0 Monitoring Software Distribution 
  3816.  
  3817. Chapter 24 discussed the creation and management of packages.  This  
  3818. chapter discusses the procedures for using the Software Distribution Log  
  3819. History dialog box to monitor the success of distributed packages. 
  3820.  
  3821. NOTE:  This chapter pertains to BrightWorks. 
  3822.  
  3823.  
  3824. 25.1 Introduction 
  3825.  
  3826. The chronological events associated with scheduled packages can be  
  3827. viewed from the Software Distribution Log History dialog box.  The log  
  3828. history provides the information necessary for monitoring the success or  
  3829. failure of a distributed package.  For example, if package WINUPDATE is  
  3830. distributed to a scope having three members, the installation of the  
  3831. software and update details for all three receiving workstations can be  
  3832. verified via the log history details. 
  3833.  
  3834. 25.1.1 Access to the Software Distribution Log 
  3835.  
  3836. The Software Distribution Log History dialog box is displayed by choosing  
  3837. the Distribution command from the Administration menu.  From the sub-menu  
  3838. that displays, choose the View Distribution Log command. 
  3839.  
  3840. The Software Distribution Log History dialog box is also displayed by  
  3841. choosing the Details button in the Packages window. 
  3842.  
  3843. 25.1.2 What's in this Chapter 
  3844.  
  3845. The following chart describes the sections in this chapter: 
  3846.  
  3847. SECTION                         DESCRIPTION 
  3848. The Software Distribution Log   Describes procedures for viewing and  
  3849.                 maintaining Log history details. 
  3850.  
  3851.  
  3852. 25.2 The Software Distribution Log 
  3853.  
  3854. 25.2.1 Viewing Log History Details 
  3855.  
  3856. Use the following procedure to monitor and maintain the log history of  
  3857. distributed packages. 
  3858.  
  3859. 1.  Choose the Distribution command from the Administration menu.  From  
  3860.     the sub-menu that displays, choose the View Distribution Log command. 
  3861.  
  3862.     The Software Distribution Log History dialog box displays.  The history  
  3863.     log provides a summary of all scheduled packages.  The following  
  3864.     information is provided for each package:  
  3865.  
  3866.     o  Start Date - the date the package will be distributed 
  3867.     o  Total - the total number of workstation in the package's scope 
  3868.     o  Done - the number of successful updates so far 
  3869.     o  Errors - the total number of failed attempts at performing an  
  3870.     update 
  3871.  
  3872. NOTE:  The completed updates (Done column) may be greater than the number  
  3873. of users scheduled to receive a package (Total column).  This can occur as  
  3874. a result of rescheduling packages or when using the "Run this package always"  
  3875. update option during package scheduling. 
  3876.  
  3877. 2.  To view the individual events of a package, select the package from  
  3878.     the Software Distribution Log History dialog box, and choose the  
  3879.     Details button. 
  3880.  
  3881.     A package can also be selected by double clicking on the package name  
  3882.     in the Software Distribution Log History dialog box.  The Log Details  
  3883.     dialog box for the selected package displays. 
  3884.  
  3885.     In addition to the distribution Date/Time and target Site Name, the  
  3886.     Details of the package's chronological events are shown in three lines: 
  3887.  
  3888.     o  Identification of the target workstation - node address, user name 
  3889.     o  Additional target workstation information - location, asset tag 
  3890.     o  Results - some possible results are:  
  3891.         - Package installed successfully. 
  3892.         - Error [#]: Script "[Script name]" has not been  
  3893.         completed successfully.  
  3894.  
  3895. NOTE:  The error numbers related to unsuccessful script execution are  
  3896. documented in Chapter 22 of this manual, "Software Distribution Script  
  3897. Language."  Non zero error numbers only display if the corresponding  
  3898. option was selected when the package was created.  For instructions on  
  3899. defining "advanced package options," refer to the previous chapter. 
  3900.  
  3901. 3.  To delete a log entry, select the package from the Software  
  3902.     Distribution Log History dialog box, and choose the Delete button. 
  3903.  
  3904.     The package is removed from the list of scheduled packages.  
  3905.  
  3906. NOTE:  A log entry cannot be deleted if its associated package still exists. 
  3907.  
  3908. 4.  Choose the OK button to close the Software Distribution Log History  
  3909.     dialog box. 
  3910.  
  3911.